-
Notifications
You must be signed in to change notification settings - Fork 0
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
투 포인터 / 슬라이딩 윈도우 #27
Comments
관련문제2143 두 배열의 합 두가지 풀이 가능
1. 투 포인터
2. 이분검색각 배열당 모둔 부 배열을 만들고 오름차순한다. 각각 이분검색을 통해서 T를 만족하는 갯수를 세어줌 만족하는 숫자를 모두 세어줌 == upper_bound(0, arr.size(), diff) - lower_bound(0, arr.size(), diff) #23 upper_bound / lower_bound 개념 참고 |
관련문제
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://www.acmicpc.net/problem/2003 // 투 포인터
https://www.acmicpc.net/problem/11003 ( 데크 사용!) // 슬라이딩 윈도우
슬라이딩 윈도우 (데크 이용)
ex) 11003 예시
빼줌
-데크의 뒤쪽 : 넣을 num 값 보다 같거나 크면 num 보다 작은 값 나올때까지 pollLast
The text was updated successfully, but these errors were encountered: