잴리로그
close
프로필 배경
프로필 로고

잴리로그

  • 분류 전체보기 (22)
    • Back-End (9)
      • JAVA (5)
      • Kotlin (2)
      • Spring Boot (2)
    • Computer Science (4)
      • 자료구조 & 알고리즘 (4)
    • Zelly Project (3)
      • 큐잇(Q-!t) (3)
    • Coding Test (4)
      • Programmers (1)
      • LeetCode (2)
    • Front-End (0)
      • 자동화 테스트 (0)
    • GIT (1)
    • 프로그래머스 데브코스 백엔드 3기 (1)
    스택(Stack)

    스택(Stack)

    스택(Stack):먼저 들어간 데이터가 나중에 나오는 단순한 규칙을 가지고 있는 리스트 / 후입선출(Last In First Out) Java에서 Stack과 ArrayDeque: Java에는 Stack이란 클래스가 존재하지만, Stack을 구현할 때 아래와 같은 이유로 ArrayDeque를 일반적으로 사용A more complete and consistent set of LIFO stack operations is provided by the Deque interface and its implementations, such as ArrayDequeJava SE 21 기준 Stack 클래스 공식 문서 발췌 → 더 완전하고 일관된 스택(LIFO) 동작은 Deque 인터페이스와 그 구현체 (ArrayDequ..

    • format_list_bulleted Computer Science/자료구조 & 알고리즘
    • · 2025. 5. 28.
    • textsms

    [Medium] 739. Daily Temeratures

    문제Given an array of integers temperatures represents the daily temperatures,return an array answer such that answer[i] is the number of daysyou have to wait after the ith day to get a warmer temperature.If there is no future day for which this is possible, keep answer[i] == 0 instead. 코드import java.util.ArrayDeque;import java.util.Deque;class Solution { public int[] dailyTemperatures(int[] te..

    • format_list_bulleted Coding Test/LeetCode
    • · 2025. 5. 27.
    • textsms

    [Easy] 20. Valid Parentheses

    문제Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.An input string is valid if:Open brackets must be closed by the same type of brackets.Open brackets must be closed in the correct order.Every close bracket has a corresponding open bracket of the same type. 코드import java.util.ArrayDeque;import java.util.Deque;class Solution {..

    • format_list_bulleted Coding Test/LeetCode
    • · 2025. 5. 22.
    • textsms

    [Java] 클래스와 객체, 인스턴스

    클래스(Class): 사용자가 직접 정의하는 사용자 정의 타입을 만들려면 '틀' 또는 '설계도'가 필요한데, 이 설계도가 클래스이다.클래스에 정의한 변수를 멤버 변수 또는 필드라 함멤버 변수: 특정 클래스에 소속된 멤버필드: 데이터 항목을 가르키는 전통적 용어멤버 변수, 필드 같은 뜻으로 클래스에 소속된 변수를 뜻함클래스 관례상 대문자로 시작, 카멜케이스 사용public class Student { String name; int age; int grade; }위 예시는 Student라는 사용자 정의 타입의 설계도이다.Student 클래스의 속성으로는 name, age, grade를 가짐객체 또는 인스턴스이 클래스(설계도)를 가지고 실제 메모리에 만들어진 실체를 객체 또는 인스턴스라 ..

    • format_list_bulleted Back-End/JAVA
    • · 2025. 4. 30.
    • textsms
    [Java] 배열, for-each문

    [Java] 배열, for-each문

    배열: 같은 타입의 변수를 사용하기 편하게 하나로 묶어둔 것int [] students; // 배열 변수 선언students = new int[5]; // 배열 생성students[0] = 90; // 변수 값 대입배열은 0부터 시작ex. 요소를 5개 생성했으면 0부터 인덱스를 시작하여 가장 큰 인덱스가 4배열은 생성과 함께 자동으로 초기화 된다new int[5]에서 초기화 됨배열 참조값 보관향상된 for문배열에 있는 값들을 출력할 때 기존 for문과 for-each문을 비교// 일반 for문for (int i = 0; i 둘 다 출력하는 값은 동일하나 for-each문이 훨씬 간결함을 알 수 있음for-each문// 향상된 for문, for-each문for (int number : numbers){ ..

    • format_list_bulleted Back-End/JAVA
    • · 2025. 4. 29.
    • textsms

    [Lv.1] x만큼 간격이 있는 n개의 숫자

    문제정수 x와 자연수 n을 입력받아, x부터 시작해 x씩 증가하는 숫자를 n개 지니는 리스트를 리턴 코드class Solution { public long[] solution(int x, int n) { long[] answer = new long[n]; for (int i = 0; i 풀이길이가 n개인 배열 생성x부터 시작해서 x씩 증가하는 숫자 n개이기 때문에 i를 0부터 시작하여 x(i+1)를 반복문에 넣어 준다.등차 수열long으로 형 변환

    • format_list_bulleted Coding Test/Programmers
    • · 2025. 4. 29.
    • textsms
    • navigate_before
    • 1
    • 2
    • navigate_next
    전체 카테고리
    • 분류 전체보기 (22)
      • Back-End (9)
        • JAVA (5)
        • Kotlin (2)
        • Spring Boot (2)
      • Computer Science (4)
        • 자료구조 & 알고리즘 (4)
      • Zelly Project (3)
        • 큐잇(Q-!t) (3)
      • Coding Test (4)
        • Programmers (1)
        • LeetCode (2)
      • Front-End (0)
        • 자동화 테스트 (0)
      • GIT (1)
      • 프로그래머스 데브코스 백엔드 3기 (1)
    태그
    • #SpringBoot
    • #토이프로젝트
    • #stack
    • #백엔드
    • #자료구조
    • #코딩테스트
    • #Java
    • #프로그래머스
    • #cs
    • #leetcode
    전체 방문자
    오늘
    어제
    전체
    Copyright © 쭈미로운 생활 All rights reserved.
    Designed by JJuum

    티스토리툴바