上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 21 下一页

2016年6月24日

Coins in a Line II

摘要: here are n coins with different value in a line. Two players take turns to take one or two coins from left side until there are no more coins left. Th 阅读全文

posted @ 2016-06-24 10:21 Sheryl Wang 阅读(144) 评论(0) 推荐(0) 编辑

2016年6月22日

Stone Game

摘要: There is a stone game.At the beginning of the game the player picks n piles of stones in a line. The goal is to merge the stones in one pile observing 阅读全文

posted @ 2016-06-22 17:42 Sheryl Wang 阅读(742) 评论(0) 推荐(0) 编辑

2016年6月21日

Kth Smallest Sum In Two Sorted Arrays

摘要: Given two integer arrays sorted in ascending order and an integer k. Define sum = a + b, where a is an element from the first array and b is an elemen 阅读全文

posted @ 2016-06-21 20:07 Sheryl Wang 阅读(753) 评论(0) 推荐(0) 编辑

Kth Smallest Number in Sorted Matrix

摘要: Find the kth smallest number in at row and column sorted matrix. Given k = 4 and a matrix: [ [1 ,5 ,7], [3 ,7 ,8], [4 ,8 ,9], ] return 5 这一题是Kth Large 阅读全文

posted @ 2016-06-21 16:11 Sheryl Wang 阅读(252) 评论(0) 推荐(0) 编辑

Find Peak Element II

摘要: There is an integer matrix which has the following features: The numbers in adjacent positions are different. The matrix has n rows and m columns. For 阅读全文

posted @ 2016-06-21 10:13 Sheryl Wang 阅读(168) 评论(0) 推荐(0) 编辑

2016年6月19日

Coins in a Line

摘要: There are n coins in a line. Two players take turns to take one or two coins from right side until there are no more coins left. The player who take t 阅读全文

posted @ 2016-06-19 11:30 Sheryl Wang 阅读(165) 评论(0) 推荐(0) 编辑

2016年6月18日

Number of Airplanes in the Sky

摘要: Given an interval list which are flying and landing time of the flight. How many airplanes are on the sky at most? Notice If landing and flying happen 阅读全文

posted @ 2016-06-18 21:29 Sheryl Wang 阅读(261) 评论(0) 推荐(0) 编辑

Clone Graph

摘要: Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. OJ's undirected graph serialization: Nodes are labeled 阅读全文

posted @ 2016-06-18 20:21 Sheryl Wang 阅读(181) 评论(0) 推荐(0) 编辑

Implement Queue using Stacks

摘要: mplement the following operations of a queue using stacks. push(x) -- Push element x to the back of queue. pop() -- Removes the element from in front 阅读全文

posted @ 2016-06-18 11:23 Sheryl Wang 阅读(101) 评论(0) 推荐(0) 编辑

2016年6月17日

Top K Frequent Words

摘要: Given a list of words and an integer k, return the top k frequent words in the list. Given for k = 3, return ["code", "lint", "baby"]. for k = 4, retu 阅读全文

posted @ 2016-06-17 21:55 Sheryl Wang 阅读(469) 评论(0) 推荐(0) 编辑

上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 21 下一页

导航