上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 54 下一页
摘要: Given a sorted array, two integers k and x, find the k closest elements to x in the array. The result should also be sorted in ascending order. If the 阅读全文
posted @ 2019-02-19 06:51 北叶青藤 阅读(140) 评论(0) 推荐(0)
摘要: Basic Calculator I Implement a basic calculator to evaluate a simple expression string. The expression string may contain open ( and closing parenthes 阅读全文
posted @ 2019-02-18 02:42 北叶青藤 阅读(376) 评论(0) 推荐(0)
摘要: Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are n 阅读全文
posted @ 2019-02-14 14:53 北叶青藤 阅读(122) 评论(0) 推荐(0)
摘要: Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) Yo 阅读全文
posted @ 2019-02-03 07:59 北叶青藤 阅读(186) 评论(0) 推荐(0)
摘要: Given an integer n, return 1 - n in lexicographical order. For example, given 13, return: [1,10,11,12,13,2,3,4,5,6,7,8,9]. Please optimize your algori 阅读全文
posted @ 2017-01-09 11:40 北叶青藤 阅读(192) 评论(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 @ 2017-01-09 10:48 北叶青藤 阅读(177) 评论(0) 推荐(0)
摘要: From:http://bradforj287.blogspot.com/2010/11/efficient-circular-buffer-in-java.html 阅读全文
posted @ 2017-01-05 14:56 北叶青藤 阅读(291) 评论(0) 推荐(0)
摘要: This problem can be solved by using a heap. The time is O(nlog(n)). Given m arrays, the minimum elements of all arrays can form a heap. It takes O(log 阅读全文
posted @ 2017-01-05 08:52 北叶青藤 阅读(481) 评论(0) 推荐(0)
摘要: Part 1: 前言: 最近看了一些关于短址(short URL)方面的一些博客,有些博客说到一些好的东西,但是,也不是很全,所以,这篇博客算是对其它博客的一个总结吧。 介绍: 短址,顾名思义,就是把长的 URL 转成短的 URL, 现在提供这种服务的有很多公司,我们以google家的 URL sh 阅读全文
posted @ 2017-01-04 08:21 北叶青藤 阅读(585) 评论(0) 推荐(0)
摘要: Given a string representing arbitrarily nested ternary expressions, calculate the result of the expression. You can always assume that the given expre 阅读全文
posted @ 2017-01-03 10:36 北叶青藤 阅读(224) 评论(0) 推荐(0)
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 54 下一页