随笔分类 -  Level 3

上一页 1 2 3 4 5 6 7 ··· 10 下一页
摘要:We have a list of points on the plane. Find the K closest points to the origin (0, 0). (Here, the distance between two points on a plane is the Euclid 阅读全文
posted @ 2019-07-15 02:03 北叶青藤 阅读(359) 评论(0) 推荐(0)
摘要:Given N, consider a convex N-sided polygon with vertices labelled A[0], A[i], ..., A[N-1] in clockwise order. Suppose you triangulate the polygon into 阅读全文
posted @ 2019-07-09 09:33 北叶青藤 阅读(656) 评论(0) 推荐(0)
摘要:There is a ball in a maze with empty spaces and walls. The ball can go through empty spaces by rolling up, down, left or right, but it won't stop roll 阅读全文
posted @ 2019-07-07 13:38 北叶青藤 阅读(489) 评论(0) 推荐(0)
摘要:Given a char array representing tasks CPU need to do. It contains capital letters A to Z where different letters represent different tasks.Tasks could 阅读全文
posted @ 2019-06-26 14:21 北叶青藤 阅读(370) 评论(0) 推荐(0)
摘要:In this problem, a tree is an undirected graph that is connected and has no cycles. The given input is a graph that started as a tree with N nodes (wi 阅读全文
posted @ 2019-06-22 10:46 北叶青藤 阅读(216) 评论(0) 推荐(0)
摘要:Given a string s, find the longest palindromic subsequence's length in s. You may assume that the maximum length of s is 1000. Example 1:Input: "bbbab 阅读全文
posted @ 2019-06-16 06:51 北叶青藤 阅读(107) 评论(0) 推荐(0)
摘要:A group of friends went on holiday and sometimes lent each other money. For example, Alice paid for Bill's lunch for $10. Then later Chris gave Alice 阅读全文
posted @ 2019-06-16 01:31 北叶青藤 阅读(340) 评论(0) 推荐(0)
摘要:Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers (h, k), where h is the height of the pers 阅读全文
posted @ 2019-06-09 11:17 北叶青藤 阅读(148) 评论(0) 推荐(0)
摘要:Given an array of integers nums and a positive integer k, find whether it's possible to divide this array into k non-empty subsets whose sums are all 阅读全文
posted @ 2019-05-06 00:31 北叶青藤 阅读(414) 评论(0) 推荐(0)
摘要:Given a non-empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both 阅读全文
posted @ 2019-05-06 00:11 北叶青藤 阅读(300) 评论(0) 推荐(0)
摘要:Given a string s and a non-empty string p, find all the start indices of p's anagrams in s. Strings consists of lowercase English letters only and the 阅读全文
posted @ 2019-04-28 11:21 北叶青藤 阅读(147) 评论(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 北叶青藤 阅读(373) 评论(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 北叶青藤 阅读(174) 评论(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 @ 2017-01-03 00:20 北叶青藤 阅读(256) 评论(0) 推荐(0)
摘要:In the "100 game," two players take turns adding, to a running total, any integer from 1..10. The player who first causes the running total to reach o 阅读全文
posted @ 2017-01-02 02:26 北叶青藤 阅读(349) 评论(0) 推荐(0)
摘要:From: http://www.geeksforgeeks.org/find-number-of-triangles-possible/ Given an unsorted array of positive integers. Find the number of triangles that 阅读全文
posted @ 2017-01-01 05:34 北叶青藤 阅读(495) 评论(0) 推荐(0)
摘要:Path Sum I Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the g 阅读全文
posted @ 2016-12-31 01:12 北叶青藤 阅读(283) 评论(0) 推荐(0)
摘要:Suppose we abstract our file system by a string in the following manner: The string "dir\n\tsubdir1\n\tsubdir2\n\t\tfile.ext" represents: dir subdir1 阅读全文
posted @ 2016-12-28 06:19 北叶青藤 阅读(199) 评论(0) 推荐(0)
摘要:Given two Binary Search Trees, find common nodes in them. In other words, find intersection of two BSTs. Example: from: http://www.geeksforgeeks.org/p 阅读全文
posted @ 2016-12-19 14:17 北叶青藤 阅读(368) 评论(0) 推荐(0)
摘要:Given an array of integers with possible duplicates, randomly output the index of a given target number. You can assume that the given target number m 阅读全文
posted @ 2016-12-13 10:21 北叶青藤 阅读(204) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 ··· 10 下一页