2020-01-01から1日間の記事一覧

LeetCode - Is Subsequence - Day1 (1/1/2020)

Is Subsequence Question Given a string s and a string t, check if s is subsequence of t. You may assume that there is only lower case English letters in both s and t. t is potentially a very long (length ~= 500,000) string, and s is a shor…

LeetCode - Meeting Rooms II - Day1 (1/1/2020)

Meeting Rooms II Question Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei), find the minimum number of conference rooms required. Example 1: Input: [[0, 30],[5, 10],[15, 20]] Output…

LeetCode - Meeting Rooms - Day1 (1/1/2020)

Meeting Rooms Question Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei), determine if a person could attend all meetings. Example 1: Input: [[0,30],[5,10],[15,20]] Output: false Exa…

LeetCode - Move Zeros - Day1 (1/1/2020)

Move Zeros Question Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. Example: Input: [0,1,0,3,12] Output: [1,3,12,0,0] Note: You must do this in-place wit…

LeetCode - Preface - Day1 (1/1/2020)

LeetCode as routine I have started LeetCode as a daily routine from New Year's Day of 2020! My daily goal is to solve and write write-ups for 5 questions per day. Why do I do this routine? The reason is simple. I really wanna pass the codi…