上一页 1 ··· 13 14 15 16 17
摘要: Given a non-empty string containing an out-of-order English representation of digits 0-9, output the digits in ascending order. Note: Example 1: Examp 阅读全文
posted @ 2016-12-10 00:18 wilderness 阅读(206) 评论(0) 推荐(0) 编辑
摘要: You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontally/ve 阅读全文
posted @ 2016-12-09 13:13 wilderness 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 这个题为《编程珠玑》中提到的算法,解题思路和桶排序/基数排序一样,适用于大量没有重复的数据。 结题思路: 1.遍历整个数据文件,每提取一个数据,在BitMap中对应的位置赋1 2.遍历BitMap的每一位,为1的位置上输出其再BitMap中的坐标 阅读全文
posted @ 2016-12-08 22:44 wilderness 阅读(302) 评论(0) 推荐(0) 编辑
摘要: Count the number of segments in a string, where a segment is defined to be a contiguous sequence of non-space characters. Please note that the string 阅读全文
posted @ 2016-12-08 22:35 wilderness 阅读(223) 评论(0) 推荐(0) 编辑
摘要: Given an 2D board, count how many different battleships are in it. The battleships are represented with 'X's, empty slots are represented with '.'s. Y 阅读全文
posted @ 2016-12-08 21:21 wilderness 阅读(570) 评论(0) 推荐(0) 编辑
摘要: Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the leng 阅读全文
posted @ 2016-12-08 21:15 wilderness 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 首先想到的是走到其中一个链表的尽头,然后把剩余的链表中的值放入写的链表,返回,但是自己写的代码好长。 Python: 阅读全文
posted @ 2016-12-08 21:02 wilderness 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 1. Two SumGiven an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input wou 阅读全文
posted @ 2016-12-08 20:56 wilderness 阅读(136) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17