본문 바로가기

LeetCode41

[LeetCode] 40. Combination Sum II 문제 URL : https://leetcode.com/problems/combination-sum-ii/ Combination Sum II - LeetCode Can you solve this real interview question? Combination Sum II - Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sum to target. Each number in candid leetcode.com 문제 접근법 : candidates안에있는 수를 뽑아서 전부 더했을때 t.. 2023. 8. 31.
[LeetCode] 37. Sudoku Solver 문제 URL : https://leetcode.com/problems/sudoku-solver/description/ Sudoku Solver - LeetCode Can you solve this real interview question? Sudoku Solver - Write a program to solve a Sudoku puzzle by filling the empty cells. A sudoku solution must satisfy all of the following rules: 1. Each of the digits 1-9 must occur exactly once in each row. 2. Ea leetcode.com 문제 접근법 : 백트래킹을이용해서 스도쿠의 모든 빈칸을 채우는 문제.. 2023. 8. 31.
[LeetCode] 146. LRU Cache 문제 URL : https://leetcode.com/problems/lru-cache/description/ LRU Cache - LeetCode Can you solve this real interview question? LRU Cache - Design a data structure that follows the constraints of a Least Recently Used (LRU) cache [https://en.wikipedia.org/wiki/Cache_replacement_policies#LRU]. Implement the LRUCache class: * LRUCache(int c leetcode.com 문제 접근법 : LRU cache 문제인데 os 공부하셨다면 LRU 페이지 교체는.. 2023. 8. 31.
[LeetCode] 71. Simplify Path 문제 URL : https://leetcode.com/problems/simplify-path/ Simplify Path - LeetCode Can you solve this real interview question? Simplify Path - Given a string path, which is an absolute path (starting with a slash '/') to a file or directory in a Unix-style file system, convert it to the simplified canonical path. In a Unix-style file sys leetcode.com 문제 접근법 : 구현문제입니다. / or //는 /로 처리하고 .은 현재 디렉터리 ..은.. 2023. 8. 29.