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

2016年6月17日

Merge k Sorted Arrays

摘要: Given k sorted integer arrays, merge them into one sorted array. Given 3 sorted arrays: return [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]. 这题和merge k sort 阅读全文

posted @ 2016-06-17 20:48 Sheryl Wang 阅读(278) 评论(0) 推荐(0) 编辑

Super Ugly Number

摘要: Write a program to find the nth super ugly number. Super ugly numbers are positive numbers whose all prime factors are in the given prime list primes 阅读全文

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

2016年6月16日

Ugly Number II

摘要: Ugly number is a number that only have factors 2, 3 and 5. Design an algorithm to find the nth ugly number. The first 10 ugly numbers are 1, 2, 3, 4, 阅读全文

posted @ 2016-06-16 19:37 Sheryl Wang 阅读(177) 评论(0) 推荐(0) 编辑

Maximal Rectangle

摘要: Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area. Subscribe to see which companies 阅读全文

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

Rehashing

摘要: The size of the hash table is not determinate at the very beginning. If the total size of keys is too large (e.g. size >= capacity / 10), we should do 阅读全文

posted @ 2016-06-16 10:53 Sheryl Wang 阅读(202) 评论(0) 推荐(0) 编辑

2016年6月15日

Max Tree

摘要: Given an integer array with no duplicates. A max tree building on this array is defined as follow: The root is the maximum number in the array The lef 阅读全文

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

Hash Function

摘要: In data structure Hash, hash function is used to convert a string(or any other type) into an integer smaller than hash size and bigger or equal to zer 阅读全文

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

Maximal Square

摘要: Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area. For example, given the following mat 阅读全文

posted @ 2016-06-15 16:13 Sheryl Wang 阅读(232) 评论(0) 推荐(0) 编辑

2016年6月13日

Largest Rectangle in Histogram

摘要: Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the hist 阅读全文

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

Number of Islands

摘要: Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacen 阅读全文

posted @ 2016-06-13 11:47 Sheryl Wang 阅读(213) 评论(0) 推荐(0) 编辑

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

导航