摘要:Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given [100, 4, 200, 1, 3, 2],The longest...
阅读全文
摘要:Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-leaf path 1->2->3 which...
阅读全文
摘要:Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from start to end, such that:Only one letter can be ch...
阅读全文
摘要:Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example,"A man, a plan, a canal: Pana...
阅读全文
摘要:[LeetCode] Remove Duplicates from Sorted Array 解题报告Given a sorted array, remove the duplicates in place such that each element appear only once and re...
阅读全文
摘要:Given an integer, print the closest number to it that is a palindrome - eg, the number "1224" would return "1221".[Thoughts]pseudo code: (with two exa...
阅读全文
摘要:In our indexes, we have millions of URLs each of which has a link to the page content, now, suppose a user type a query with wild cards *, which repre...
阅读全文
摘要:Desgin an algorithm to find whether a given sting is formed by the Intealeaving of two given strings. For example, stringA: ABCEF...string B: ABCA......
阅读全文
摘要:In Binary Tree, Inorder successor of a node is the next node in Inorder traversal of the Binary Tree. Inorder Successor is NULL for the last node in...
阅读全文
摘要:1. Pass by pointer VS referenceA pointer can receive a NULL parameter, a reference parameter can not. If there's ever a chance that you could want to ...
阅读全文
摘要:Given an array of numbers, nums, return an array of numbers products, where products[i] is the product of all nums[j], j != i.Input : [1, 2, 3, 4, 5]O...
阅读全文