Python String method
가끔 알고리즘을 풀다 보면 string method를 필요로 할 경우들이 있다. 아주 쉬운 문제인 경우는 string method를 이용하면 순식간에 풀 수 있다. 하지만 기억이 가물가물할 경우에는 한참을 돌아가야 한다. 때문에 이에 대해서 document를 보면서 정리한다.
가끔 알고리즘을 풀다 보면 string method를 필요로 할 경우들이 있다. 아주 쉬운 문제인 경우는 string method를 이용하면 순식간에 풀 수 있다. 하지만 기억이 가물가물할 경우에는 한참을 돌아가야 한다. 때문에 이에 대해서 document를 보면서 정리한다.
121. Best Time to Buy and Sell Stock #Array #Dynamic Programming #blind75/2 problem You are given an array prices where prices[i] is the price of a given stock on the ith day. You want to maximize your profit by choosing a single day to buy one stock and
1. Two Sum #Array #Hash_table #blind75/1 problem Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same
2073. Time Needed to Buy Tickets #Easy #Queue problem There are n people in a line queuing to buy tickets, where the 0th person is at the front of the line and the (n - 1)th person is at the back of the line. You are given a 0-indexed
1700. Number of Students Unable to Eat Lunch #Easy #Queue problem The school cafeteria offers circular and square sandwiches at lunch break, referred to by numbers 0 and 1 respectively. All students stand in a queue. Each student either prefers square or circular sandwiches. The number of sandwiches in the