https://leetcode.com/problems/longest-consecutive-sequence/ Longest Consecutive Sequence - LeetCode Longest Consecutive Sequence - Given an unsorted array of integers nums, return the length of the longest consecutive elements sequence. You must write an algorithm that runs in O(n) time. Example 1: Input: nums = [100,4,200,1,3,2] Output: 4 Explanati leetcode.com 간단한 문제이기만 해시 테이블을 활용해서 푸느냐, 아니냐에 ..
leetcode
https://leetcode.com/problems/daily-temperatures/description/ Daily Temperatures - LeetCode Daily Temperatures - Given an array of integers temperatures represents the daily temperatures, return an array answer such that answer[i] is the number of days you have to wait after the ith day to get a warmer temperature. If there is no future day for w leetcode.com class Solution: def dailyTemperature..
https://leetcode.com/problems/design-browser-history/ Design Browser History - LeetCode Design Browser History - You have a browser of one tab where you start on the homepage and you can visit another url, get back in the history number of steps or move forward in the history number of steps. Implement the BrowserHistory class: * BrowserHisto leetcode.com 파이썬 코드 더보기 class ListNode(object): def _..