| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 |
- 투포인터
- LeetCode
- Git
- 백준
- 자바스크립트
- 그리디
- 방송통신대학교
- DP
- greedy
- javascript
- 알고리즘
- 컴퓨터과학과
- 코테
- java
- 방송대
- algorithm
- two pointers
- sliding window
- 자바
- 리트코드
- 완전탐색
- 코딩
- it
- 방통대
- boj
- 탐욕알고리즘
- 이진탐색
- 깃
- Binary Search
- dynamic programming
- Today
- Total
목록two pointers (9)
개발이 취미인 주니어 기획자
#투포인터 #Gold5https://www.acmicpc.net/problem/2470🌷 문제 설명✏️ 백준 연습문제: #2470. 두 용액KOI 부설 과학연구소에서는 많은 종류의 산성 용액과 알칼리성 용액을 보유하고 있다. 각 용액에는 그 용액의 특성을 나타내는 하나의 정수가 주어져있다. 산성 용액의 특성값은 1부터 1,000,000,000까지의 양의 정수로 나타내고, 알칼리성 용액의 특성값은 -1부터 -1,000,000,000까지의 음의 정수로 나타낸다. 같은 양의 두 용액을 혼합한 용액의 특성값은 혼합에 사용된 각 용액의 특성값의 합으로 정의한다. 이 연구소에서는 같은 양의 두 용액을 혼합하여 특성값이 0에 가장 가까운 용액을 만들려고 한다. 예를 들어, 주어진 용액들의 특성값이 [-2, 4, ..
#투포인터 #EASY Palindrome Number - LeetCode Can you solve this real interview question? Palindrome Number - Given an integer x, return true if x is a palindrome, and false otherwise. Example 1: Input: x = 121 Output: true Explanation: 121 reads as 121 from left to right and from right to left. Ex leetcode.com 🌷 문제 설명 ✏️ LeetCode 연습문제: Search Insert Position Given an integer x, return true if x is a..
#투포인터 #EASY Middle of the Linked List - LeetCode Can you solve this real interview question? 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. Example 1: [https://assets.leetcode. leetcode.com 🌷 문제 설명 ✏️ LeetCode 연습문제: Middle of the Linked List Given the head of a singly lin..
#투포인터 #MEDIUM Two Sum II - Input Array Is Sorted - LeetCode Can you solve this real interview question? Two Sum II - Input Array Is Sorted - Given a 1-indexed array of integers numbers that is already sorted in non-decreasing order, find two numbers such that they add up to a specific target number. Let these two n leetcode.com 🌷 문제 설명 ✏️ LeetCode 연습문제: Two Sum II - Input Array Is Sorted Given a..
#투포인터 #EASY
#투포인터 #EASY Reverse String - LeetCode Can you solve this real interview question? 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 [https://en.wikipedia.org/wiki/In-place_algo leetcode.com 🌷 문제 설명 ✏️ LeetCode 연습문제: Reverse String Write a function that reverses a string. The inpu..
#투포인터 #EASY Move Zeroes - LeetCode Can you solve this real interview question? Move Zeroes - Given an integer array nums, move all 0's to the end of it while maintaining the relative order of the non-zero elements. Note that you must do this in-place without making a copy of the array. E leetcode.com 🌷 문제 설명 ✏️ LeetCode 연습문제: Move Zeros Given an integer array nums, move all 0's to the end of it..
🚀 투포인터(Two Pointers)란? 정렬이 되어 있는 자료에서 두 포인터가 가리키는 값이 반환하는 값을 찾아내는 탐색 알고리즘. 타겟 값을 반환하는 한 쌍을 찾을 때까지 이진 검색을 순환적으로 반복 수행하며, 메모리와 시간 절약을 가져온다. 투포인터의 시간 복잡도는 O(N)이다. 🔎 투포인터 이해하기 1. Reverse Pointers ❓오름차순으로 정렬된 배열에서 두 수의 합이 타겟이 되는 값을 탐색해야 하는 상황일 때를 가정한다. 1. 포인터1(처음)과 포인터2(끝)를 정의한다 2. 포인터1과 포인터2의 합과 타겟 값을 비교한다 3-1. 포인터1과 포인터2의 합이 타겟값보다 작으면, 포인터1을 우측(+1)으로 옮긴다 3-2. 포인터1과 포인터2의 합이 타겟값보다 크면, 포인터2를 좌측(-1)으로..
#투포인터 #EASY Squares of a Sorted Array - LeetCode Can you solve this real interview question? Squares of a Sorted Array - Given an integer array nums sorted in non-decreasing order, return an array of the squares of each number sorted in non-decreasing order. Example 1: Input: nums = [-4,-1,0,3,10] Out leetcode.com 🌷 문제 설명 ✏️ LeetCode 연습문제: Squares of a Sorted Array Given an integer array nums so..