# Two pointers
[BOJ] 2230번 : 수 고르기
문제 N개의 정수로 이루어진 수열 A[1], A[2], …, A[N]이 있다. 이 수열에서 두 수를 골랐을 때(같은 수일 수도 있다), 그 차이가 M 이상이면서 제일 작은 경우를 구하는 프로그램을 작성하시오. 예를 들어 수열이 {1, 2, 3, 4, 5}라고 하자.

[Leetcode] 763. Partition Labels
You are given a string s. We want to partition the string into as many parts as possible so that each letter appears in at most one part.Note that the
[BOJ] 2003번 : 수들의 합 2
문제 N개의 수로 된 수열 A[1], A[2], …, A[N] 이 있다. 이 수열의 i번째 수부터 j번째 수까지의 합 A[i] + A[i+1] + … + A[j-1] + A[j]가 M이 되는 경우의 수를 구하는 프로그램을 작성하시오. 시간 제한 : 0.5초 메모리 제한 : 128MB 입력 첫째 줄에 N(1 ≤ N ≤ 10,000), M(1 ...
[BOJ] 2470번 : 두 용액
문제 KOI 부설 과학연구소에서는 많은 종류의 산성 용액과 알칼리성 용액을 보유하고 있다. 각 용액에는 그 용액의 특성을 나타내는 하나의 정수가 주어져있다. 산성 용액의 특성값은 1부터 1,000,000,000까지의 양의 정수로 나타내고, 알칼리성 용액의 특성값은

[Leetcode]392. Is Subsequence
Given two strings s and t, return true if s is a subsequence of t, or false otherwise.A subsequence of a string is a new string that is formed from th

[Leetcode]19. Remove Nth Node From End of List
Given the head of a linked list, remove the nth node from the end of the list and return its head.get the size of the linked list to caculate times fo

[Leetcode]876. Middle of the Linked List
Given the head of a singly linked list, return the middle node of the linked list.If there are two middle nodes, return the second middle node.Time Co

[Leetcode]344. Reverse String
Write a function that reverses a string. The input string is given as an array of characters s.You must do this by modifying the input array in-place

[Leetcode] 350. Intersection of Two Arrays II
Given two integer arrays nums1 and nums2, return an array of their intersection. Each element in the result must appear as many times as it shows in b

Baekjoon 2003 Sum of numbers in Go
Scan function didn't wait when I put Enter(\\n)So I checked and modified like below.Enter should be included with ScanfI added Go routine and changed
알고리즘-two pointers
화살표 두개에 의미를 부여해서 탐색범위를 압축시키는 방법 key word: 연속 부분 수열, 순서를 지키며 차례대로,곱의 최소, 부분합 1차원배열에 2개의 포인터 1-1 두개의 포인터가 왼쪽에서 시작하여 같은 방향으로 이동 1-2 두개의 포이터가 양 끝에서 서로에게로

[AL] 투 포인터 알고리즘 (+슬라이딩 윈도우) - JavaScript
일차원 배열이 주어졌을 때 연속된 구간의 합이 M이 되도록 하는 경우의 수를 구하는 문제가 주어진다면 가장 먼저 생각 하는 방법은 바로 이중 for문을 이용하는 방법이다.위와 같은 방법으로 이중 for문을 이용하면 시간 복잡도가 $O(N^2)$ 이므로 배열의 크기가 커
350. Intersection of Two Arrays II
Given two integer arrays nums1 and nums2, return an array of their intersection. Each element in the result must appear as many times as it ....
88. Merge Sorted Array
You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of ....