上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 21 下一页

2016年7月11日

Binary Tree Inorder Traversal

摘要: 基础功底,此类模板以后一次总结: 阅读全文

posted @ 2016-07-11 09:52 Sheryl Wang 阅读(108) 评论(0) 推荐(0) 编辑

2016年7月9日

Nuts & Bolts Problem

摘要: Given a set of n nuts of different sizes and n bolts of different sizes. There is a one-one mapping between nuts and bolts. Comparison of a nut to ano 阅读全文

posted @ 2016-07-09 21:47 Sheryl Wang 阅读(842) 评论(0) 推荐(0) 编辑

Sliding Window Median

摘要: Given an array of n integer with duplicate number, and a moving window(size k), move the window at each iteration from the start of the array, find th 阅读全文

posted @ 2016-07-09 11:56 Sheryl Wang 阅读(221) 评论(0) 推荐(0) 编辑

Sliding Window Maximum

摘要: Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the knumb 阅读全文

posted @ 2016-07-09 11:37 Sheryl Wang 阅读(216) 评论(0) 推荐(0) 编辑

2016年7月8日

Find Median from Data Stream

摘要: Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two 阅读全文

posted @ 2016-07-08 16:31 Sheryl Wang 阅读(227) 评论(0) 推荐(0) 编辑

hashheap python 实现

摘要: 这个hashheap的实现可以既可以是最大堆,也可以是最小堆,同时因为hash表中存的value是在heap数组中的index和这个key值的数目,所以可以处理重复数字.关键在于siftup和siftdown的非递归实现.siftdown相当于heapify,但是之前只使用过递归版本. 阅读全文

posted @ 2016-07-08 11:53 Sheryl Wang 阅读(948) 评论(0) 推荐(0) 编辑

2016年7月6日

Find the Weak Connected Component in the Directed Graph

摘要: Find the number Weak Connected Component in the directed graph. Each node in the graph contains a label and a list of its neighbors. (a connected set 阅读全文

posted @ 2016-07-06 14:43 Sheryl Wang 阅读(243) 评论(0) 推荐(0) 编辑

2016年7月5日

Word Search II

摘要: Given a 2D board and a list of words from the dictionary, find all words in the board. Each word must be constructed from letters of sequentially adja 阅读全文

posted @ 2016-07-05 15:07 Sheryl Wang 阅读(136) 评论(0) 推荐(0) 编辑

2016年7月4日

Word Search

摘要: Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjac 阅读全文

posted @ 2016-07-04 21:08 Sheryl Wang 阅读(230) 评论(0) 推荐(0) 编辑

Add and Search Word - Data structure design

摘要: Design a data structure that supports the following two operations: search(word) can search a literal word or a regular expression string containing o 阅读全文

posted @ 2016-07-04 15:49 Sheryl Wang 阅读(173) 评论(0) 推荐(0) 编辑

上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 21 下一页

导航