Simplify Path
LeetCode 71. 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 ...
LeetCode 71. 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 ...
LeetCode 200. Number of Islands 원문 Given an m x n 2D binary grid grid which represents a map of '1's(land) and '0's(water), return the number of islands. An island is surrounded by water and is f...
LeetCode 138. Copy List with Random Pointer 원문 A linked list of length n is given such that each node contains an additional random pointer, which could point to any node in the list, or null. Co...
LeetCode 79. Word Search 원문 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 ce...
LeetCode 46. Permutations 원문 Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order. 풀이 백트래킹. 지금까지 추가한 숫자 집합의 크기가 nums의 크기와 같다면...
동작 설명 레시피를 등록하거나 수정할 때 데이터베이스에 없는 재료를 입력한 경우 새로운 재료를 등록하고 레시피를 저장한다. RecipeViewSet class RecipeViewSet(ModelViewSet): serializer_class = RecipeSerializer queryset = Recipe.objects.all() ...
LeetCode 300. Longest Increasing Subsequence 원문 Given an integer array nums, return the length of the longest strictly increasing subsequence. 풀이 리스트 result를 생성한다. 리스트의 첫 원소는 nums[0]이다. nums의 두 번...
LeetCode 34. Find First and Last Position of Element in Sorted Array 원문 Given an array of integers nums sorted in non-decreasing order, find the starting and ending position of a given target valu...
mysqlclient 설치 $ pip install mysqlclient $ pip freeze > requirements.txt .env 다음을 .env에 추가해준다. db_name = `데이터베이스 이름` db_user = `계정명` db_pw = `비밀번호` db_host = `호스트 주소` db_port = `포트 번호` sett...
LeetCode 11. Container With Most Water 원문 You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, height[...