摘要:
public class Solution { public static void main(String[] args) { System.out.println(parseCSV( "\"Kobe Bryant, 2020\",AAA, McDonald\"\"\"\"s, \"McDonal 阅读全文
摘要:
https://leetcode.com/discuss/interview-question/742523/facebook-prep-question-contiguous-subarrays-on-solution 1 int[] countSubarrays(int[] arr) { 2 i 阅读全文
摘要:
O(n) look for the median(or any target rank) in an array 1 class Solution { 2 public static void main(String[] args) { 3 Solution solution = new Solut 阅读全文
摘要:
630. Course Schedule III There are n different online courses numbered from 1 to n. Each course has some duration(course length) t and closed on dthda 阅读全文
摘要:
621. Task Scheduler Given a char array representing tasks CPU need to do. It contains capital letters A to Z where different letters represent differe 阅读全文
摘要:
72. Edit Distance Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 阅读全文
摘要:
56. Merge Intervals Given a collection of intervals, merge all overlapping intervals. For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10] 阅读全文
摘要:
32. Longest Valid Parentheses Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parenthese 阅读全文
摘要:
384. Shuffle an Array Shuffle a set of numbers without duplicates. Example: // Init an array with set 1, 2, and 3. int[] nums = {1,2,3}; Solution solu 阅读全文
摘要:
232. Implement Queue using Stacks Implement the following operations of a queue using stacks. push(x) -- Push element x to the back of queue. pop() -- 阅读全文