01 2015 档案

Intersection of Two Linked Lists(LIST-2 POINTER)
摘要:Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:A: a1 → a... 阅读全文

posted @ 2015-01-16 21:52 joannae 阅读(154) 评论(0) 推荐(0)

Find Peak Element(ARRAY - Devide-and-Conquer)
摘要:QUESTIONA peak element is an element that is greater than its neighbors.Given an input array wherenum[i] ≠ num[i+1], find a peak element and return it... 阅读全文

posted @ 2015-01-12 23:07 joannae 阅读(277) 评论(0) 推荐(0)

Dungeon Game (GRAPH - DP)
摘要:QUESTIONThe demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid ... 阅读全文

posted @ 2015-01-09 22:22 joannae 阅读(226) 评论(0) 推荐(0)

Binary Search Tree Iterator
摘要:QUESTIONImplement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Calling next() will retur... 阅读全文

posted @ 2015-01-08 23:38 joannae 阅读(142) 评论(0) 推荐(0)

Factorial Trailing Zeroes (Divide-and-Conquer)
摘要:QUESTIONGiven an integer n, return the number of trailing zeroes in n!.Note: Your solution should be in logarithmic time complexity.FIRST TRYclass Sol... 阅读全文

posted @ 2015-01-03 19:21 joannae 阅读(222) 评论(0) 推荐(0)

Excel Sheet Column Number(STRING-TYPE CONVERTION)
摘要:QUESTIONRelated to question Excel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For examp... 阅读全文

posted @ 2015-01-03 17:06 joannae 阅读(166) 评论(0) 推荐(0)

Majority Element(ARRAY-BINARY SEARCH)
摘要:QUESTIONGiven an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume t... 阅读全文

posted @ 2015-01-03 10:47 joannae 阅读(164) 评论(0) 推荐(0)

Excel Sheet Column Title (STRING - TYPE CONVERTION)
摘要:QUESTIONGiven a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2 -> B 3 -> C ... ... 阅读全文

posted @ 2015-01-03 07:34 joannae 阅读(213) 评论(0) 推荐(0)

导航