02 2013 档案

[LeetCode] Longest Consecutive Sequence, Solution
摘要: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... 阅读全文

posted @ 2013-02-23 16:02 小刀初试 阅读(152) 评论(0) 推荐(0) 编辑

[LeetCode] Sum Root to Leaf Numbers, Solution
摘要: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... 阅读全文

posted @ 2013-02-23 15:35 小刀初试 阅读(127) 评论(0) 推荐(0) 编辑

[LeetCode] Word Ladder II, Solution
摘要: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... 阅读全文

posted @ 2013-02-23 10:24 小刀初试 阅读(166) 评论(0) 推荐(0) 编辑

[LeetCode] Valid Palindrome, Solution
摘要: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... 阅读全文

posted @ 2013-02-22 07:47 小刀初试 阅读(137) 评论(0) 推荐(0) 编辑

Summary
摘要:[LeetCode] Remove Duplicates from Sorted Array 解题报告Given a sorted array, remove the duplicates in place such that each element appear only once and re... 阅读全文

posted @ 2013-02-21 11:47 小刀初试 阅读(230) 评论(0) 推荐(0) 编辑

[Yahoo] Cloest palindrome number, Solution
摘要: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... 阅读全文

posted @ 2013-02-04 04:17 小刀初试 阅读(181) 评论(0) 推荐(0) 编辑

[Google] URL query with wild card
摘要: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... 阅读全文

posted @ 2013-02-03 07:19 小刀初试 阅读(115) 评论(0) 推荐(0) 编辑

[Microsoft] Intealeaving of two given strings, Solution
摘要: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...... 阅读全文

posted @ 2013-02-03 05:55 小刀初试 阅读(200) 评论(0) 推荐(0) 编辑

[Google] Inorder Successor in Binary Search Tree, Solution
摘要: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... 阅读全文

posted @ 2013-02-03 04:01 小刀初试 阅读(195) 评论(0) 推荐(0) 编辑

[C++ Summary]
摘要: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 ... 阅读全文

posted @ 2013-02-03 03:00 小刀初试 阅读(203) 评论(0) 推荐(0) 编辑

[Facebook] Products of all elements
摘要: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... 阅读全文

posted @ 2013-02-01 14:37 小刀初试 阅读(104) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示