-
Notifications
You must be signed in to change notification settings - Fork 4
[1주차] 고다혜 #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1주차] 고다혜 #1
Conversation
v[1] = false; | ||
} | ||
|
||
static void addPerson() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
굉장히 멋진 방법이네요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
감사합니다~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오랜만에 SQL 풀려니 쉬운것도 막히네요,, ㅎㅎ !!
SQL 열심히 해보겠습니당,,,
📗 월요일
[CT] 자율주행 자동차
🤔 시간복잡도 고려사항
💡 풀이 아이디어
[CT] 불안한 무빙워크
🤔 시간복잡도 고려사항
💡 풀이 아이디어
📗 화요일
[BOJ] 2531 회전 초밥
🤔 시간복잡도 고려사항
2 <= N <= 30,000
,2 <= d <= 3,000
,2 <= k <= 3,000
💡 풀이 아이디어
s ~ e 거리
가k
보다 작다면e += 1
s ~ e 거리
가k
보다 크거나 같다면s += 1
s ~ e 거리
가k
와 같다면 초밥 종류의 개수 찾기int eat[]
이 아닌HashMap<Integer, Integer>
를 통해 초밥의 개수를 구해줬었는데 시간, 메모리가 더 많이 사용됐음[SQL] Python 개발자 찾기
💡 풀이 아이디어
where
절에in
을 사용하여 조건에 알맞는 데이터 출력in
다음( )
안에는 찾으려는 데이터 뿐만 아니라 내가 찾을 데이터가 있는지 확인할열
을 넣어도 됨📗 수요일
[BOJ] 3020_개똥벌레
🤔 시간복잡도 고려사항
2 <= N <= 200,000
,2 <= H <= 500,000
이므로 모든 H에 대해 순차적으로 동굴의 길이만큼 탐색한다면 시간초과 발생💡 풀이 아이디어
📗 목요일
[PG] 132265_롤케이크 자르기
🤔 시간복잡도 고려사항
💡 풀이 아이디어
[PG] 12927_야근 지수
🤔 시간복잡도 고려사항
💡 풀이 아이디어
[SQL] 입양 시각 구하기(1)
💡 풀이 아이디어
DATETIME
이기 때문에HOUR()
함수를 사용해서 시간만 따로 추출해줌SELECT
문에서 시간을HOUR
별칭으로 설정GROUP BY HOUR
을 해서 시간대 별로 묶을 수 있도록 함📗 금요일
[PG] 49994_방문 길이
🤔 시간복잡도 고려사항
💡 풀이 아이디어
v[dir][p.r][p.c]
를 방문처리 해준다면v[((dir + 2)) % 4][nr][nc]
도 방문처리 해줘야 됨dir
방향으로 이동한 것과nr
,nc
위치에서(dir + 2) % 4
위치로 이동한 것과 같기 때문[PG] 154539_뒤에 있는 큰 수 찾기
🤔 시간복잡도 고려사항
4 <= numbers의 길이 <= 1,000,000
이므로 2중 for문을 사용하면 시간초과 발생함Stack
사용💡 풀이 아이디어
answer
배열은-1
값으로 초기화number.lengh - 1
번째idx
부터 시작해서0
번째 인덱스로numbers[i] < stack.peek()
일 때까지stack.pop()
answer[i] = stack.peek()
stack.push(numbers[i])