上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 29 下一页
摘要: The API: int read4(char *buf) reads 4 characters at a time from a file.The return value is the actual number of characters read. For example, it retur 阅读全文
posted @ 2018-09-10 04:11 jasminemzy 阅读(156) 评论(0) 推荐(0) 编辑
摘要: Given two words word1 and word2, find the minimum number of operations required to convert word1 to word2. You have the following 3 operations permitt 阅读全文
posted @ 2018-09-09 13:38 jasminemzy 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Given two strings s and t, determine if they are both one edit distance apart.Note: There are 3 possiblities to satisify one edit distance apart:1. In 阅读全文
posted @ 2018-09-09 13:37 jasminemzy 阅读(139) 评论(0) 推荐(0) 编辑
摘要: Given an array of n distinct non-empty strings, you need to generate minimal possible abbreviations for every word following rules below. 1. Begin wit 阅读全文
posted @ 2018-09-09 11:05 jasminemzy 阅读(345) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty string s and an abbreviation abbr, return whether the string matches with the given abbreviation. A string such as "word" contains o 阅读全文
posted @ 2018-09-09 04:16 jasminemzy 阅读(246) 评论(0) 推荐(0) 编辑
摘要: A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given a non-empty strin 阅读全文
posted @ 2018-09-08 06:19 jasminemzy 阅读(215) 评论(0) 推荐(0) 编辑
摘要: Merge k sorted linked lists and return it as one sorted list.Analyze and describe its complexity.ExampleGiven lists:[ 2->4->null, null, -1->null],retu 阅读全文
posted @ 2018-09-06 07:59 jasminemzy 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Given some points and a point origin in two dimensional space, find k points out of the some points which are nearest to origin. Return these points s 阅读全文
posted @ 2018-09-06 06:03 jasminemzy 阅读(265) 评论(0) 推荐(0) 编辑
摘要: Given an integer array, find the top k largest numbers in it. Example Given [3,10,1000,-99,4,100] and k = 3. Return [1000, 100, 10]. 1.用堆数据结构。O(nlogk) 阅读全文
posted @ 2018-09-06 03:43 jasminemzy 阅读(257) 评论(0) 推荐(0) 编辑
摘要: Given a stream of integers and a window size, calculate the moving average of all integers in the sliding window.ExampleMovingAverage m = new MovingAv 阅读全文
posted @ 2018-09-05 07:49 jasminemzy 阅读(244) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 29 下一页