摘要:
Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the s 阅读全文
摘要:
Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex 阅读全文
摘要:
Given an array consists of non-negative integers, your task is to count the number of triplets chosen from the array that can make triangles if we tak 阅读全文
摘要:
Given a sorted integer array without duplicates, return the summary of its ranges. Example 1: Example 2: broken solution : check the boundary revision 阅读全文
摘要:
Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal's triangle. Note that the row index starts from 0. In Pascal's trian 阅读全文
摘要:
Given a linked list, determine if it has a cycle in it. Follow up:Can you solve it without using extra space? Solution: solve the problem with one and 阅读全文
摘要:
Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), write a function to find the number of connected 阅读全文
摘要:
Given an unsorted array of integers, find the length of the longest consecutive elements sequence. Your algorithm should run in O(n) complexity. Examp 阅读全文
摘要:
dp or memo recursion 1. dp formulation 2. ispalindrome based on the nature structure 79. Word Search the key point is a||b||c||d; //I guess because of 阅读全文
摘要:
backtracking and invariant during generating the parathese righjt > left (open bracket and cloase barckst) Restore IP Addresses //insert element into 阅读全文