
Question Given a string s, return the longest palindromic substring in s. 문자열 s가 주어졌을 때, 가장 긴 palindromic 부분 문자열을 출력하라 제약사항 1 = 0; i--) { for (int j = i; j longest_length) { longest_length = j - i + 1; longest_substring = s.substr(i..

Question Given an m x n grid of characters board and a string word, return true if word exists in the grid. The word can be constructed from letters of sequentially adjacent cells, where adjacent cells are horizontally or vertically neighboring. The same letter cell may not be used more than once. Follow up: Could you use search pruning to make your solution faster with a larger board? 문자판의 m x ..

Question Given an integer array nums of unique elements, return all possible subsets (the power set). The solution set must not contain duplicate subsets. Return the solution in any order. 중복이 없는 정수 배열이 주어지면 가능한 모든 subsets(the power set)을 반환하여라. 중복된 subset이 포함되어서는 안 된다. 어떤 순서로 subset을 반환하건 상관이 없다. 제약사항 1

Question Write an efficient algorithm that searches for a value target in an m x n integer matrix matrix. This matrix has the following properties: Integers in each row are sorted in ascending from left to right. Integers in each column are sorted in ascending from top to bottom. m x n 정수 행렬 행렬에서 값 대상을 찾는 효율적인 알고리즘을 작성하십시오. 이 행렬에는 다음과 같은 속성이 있습니다. 각 행의 정수는 왼쪽에서 오른쪽으로 오름차순으로 정렬됩니다. 각 열의 정수는 위에서 아..
Question 중복 원소 없애기 정렬되어 있지 않은 연결 리스트가 주어졌을 때 이 리스트에서 중복되는 원소를 제거하는 코드를 작성하라. Solution 가능한 최선의 수행 시간(Best Conceivable Runtime(BCR) 모든 리스트의 요소들을 다 확인해봐야 하기 때문에 리스트의 최대길이를 n이라 했을 때 O(n)이다. 고려사항 리스트 원소의 자료형을 int 타입으로 가정한다. Solution1 (Bruth Force) 가장 간단한 방법이다. 첫 요소부터 순차적으로 탐색하며 같은 원소가 있으면 연결해주는 방식이다. 이 방식은 버퍼를 사용하지 않지만, 공간 복잡도에서 이득이 있다. void solution(ListNode* head) { while(head !=NULL){ ListNode* co..

Question Given an array of integers nums sorted in non-decreasing order, find the starting and ending position of a given target value. If target is not found in the array, return [-1, -1]. You must write an algorithm with O(log n) runtime complexity. 오름차순으로 정렬된 정수 배열이 주어지면 주어진 목표 값의 시작 위치와 끝 위치를 찾습니다. 배열에서 target을 찾을 수 없으면 [-1, -1]을 반환합니다. 시간 복잡도가 O(log n)인 알고리즘을 작성해야 합니다. 제약사항 0

Question A peak element is an element that is strictly greater than its neighbors. Given a 0-indexed integer array nums, find a peak element, and return its index. If the array contains multiple peaks, return the index to any of the peaks. You may imagine that nums[-1] = nums[n] = -∞. In other words, an element is always considered to be strictly greater than a neighbor that is outside the array..
- Total
- Today
- Yesterday
- 러스트 기초
- PS
- ProblemSolving
- 반드시 알아야 할 자료구조
- 맛집
- algorithm
- 러스트 입문
- 알고리즘
- 리트코드
- 솔직후기
- 내돈내산
- Tree
- 러스트
- C++
- interview question
- 트리
- Problem Solving
- Medium
- 속초 맛집
- 러스트 배우기
- Interview
- coding interview
- 인터뷰
- 자료구조
- 속초
- LeetCode
- rust
- DP
- 코딩인터뷰
- 기술면접
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |