上一页 1 2 3 4 5 6 7 ··· 21 下一页

2016年9月29日

Dungeon Game

摘要: The 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 out in a 阅读全文

posted @ 2016-09-29 16:45 Sheryl Wang 阅读(294) 评论(0) 推荐(0) 编辑

Set Matrix Zeroes

摘要: Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. click to show follow up. Follow up: Did you use extra sp 阅读全文

posted @ 2016-09-29 10:59 Sheryl Wang 阅读(139) 评论(0) 推荐(0) 编辑

2016年9月27日

Range Sum Query - Mutable

摘要: class SegmentTreeNode(object): def __init__(self, start, end): self.start = start self.end = end self.sum = 0 self.left = None self.right = None c... 阅读全文

posted @ 2016-09-27 14:12 Sheryl Wang 阅读(117) 评论(0) 推荐(0) 编辑

2016年9月11日

Text Justification

摘要: Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified. You shou 阅读全文

posted @ 2016-09-11 21:58 Sheryl Wang 阅读(177) 评论(0) 推荐(0) 编辑

2016年9月3日

Palindrome Partitioning

摘要: Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For exampl 阅读全文

posted @ 2016-09-03 19:49 Sheryl Wang 阅读(155) 评论(0) 推荐(0) 编辑

2016年9月2日

Shortest Word Distance I,II, III

摘要: 这是一系列linkedin的面试题,比较接近于Indeed的面试题目,follow up加OO的多接口形式. Shortest Word Distance Given a list of words and two words word1 and word2, return the shortest 阅读全文

posted @ 2016-09-02 14:27 Sheryl Wang 阅读(297) 评论(0) 推荐(0) 编辑

2016年9月1日

Candy

摘要: There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the following re 阅读全文

posted @ 2016-09-01 19:51 Sheryl Wang 阅读(182) 评论(0) 推荐(0) 编辑

Longest Consecutive Sequence

摘要: 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 long 阅读全文

posted @ 2016-09-01 15:45 Sheryl Wang 阅读(139) 评论(0) 推荐(0) 编辑

2016年8月30日

Convert Sorted Array to Binary Search Tree

摘要: Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 阅读全文

posted @ 2016-08-30 17:20 Sheryl Wang 阅读(102) 评论(0) 推荐(0) 编辑

First Missing Positive

摘要: Given an unsorted integer array, find the first missing positive integer. For example, Given [1,2,0] return 3, and [3,4,-1,1] return 2. Your algorithm 阅读全文

posted @ 2016-08-30 10:34 Sheryl Wang 阅读(107) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 ··· 21 下一页

导航