随笔分类 -  Level 3

上一页 1 2 3 4 5 6 7 8 ··· 10 下一页
摘要:Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. OJ's undirected graph serialization: Nodes are labeled 阅读全文
posted @ 2016-12-13 08:38 北叶青藤 阅读(195) 评论(0) 推荐(0)
摘要:给你一个字符串和字典,从头扫到位,如果到当前的字符的字符串存在于字典中,则显示 buzz. 例子: ILOVEPINEAPPLEJUICE 字典: [pine, apple, pineapple, juice, applejuice] 那么当我们到达ILOVEPINE的时候,就要buzz,当我们到达 阅读全文
posted @ 2016-11-19 05:45 北叶青藤 阅读(447) 评论(0) 推荐(0)
摘要:Given an array which consists of non-negative integers and an integer m, you can split the array into m non-empty continuous subarrays. Write an algor 阅读全文
posted @ 2016-11-17 14:17 北叶青藤 阅读(282) 评论(0) 推荐(0)
摘要:Given a binary tree where all the right nodes are either leaf nodes with a sibling (a left node that shares the same parent node) or empty, flip it up 阅读全文
posted @ 2016-11-15 00:33 北叶青藤 阅读(314) 评论(0) 推荐(0)
摘要:Convert a Binary Search Tree to a sorted Circular Doubly-Linked List in place. You can think of the left and right pointers as synonymous to the prede 阅读全文
posted @ 2016-11-11 07:54 北叶青藤 阅读(588) 评论(0) 推荐(0)
摘要:A frog is crossing a river. The river is divided into x units and at each unit there may or may not exist a stone. The frog can jump on a stone, but i 阅读全文
posted @ 2016-11-04 22:09 北叶青藤 阅读(452) 评论(0) 推荐(0)
摘要:Given an integer matrix, find the length of the longest increasing path. From each cell, you can either move to four directions: left, right, up or do 阅读全文
posted @ 2016-10-29 06:27 北叶青藤 阅读(244) 评论(0) 推荐(0)
摘要:Given a string that contains only digits 0-9 and a target value, return all possibilities to add binary operators (not unary) +, -, or *between the di 阅读全文
posted @ 2016-10-23 23:07 北叶青藤 阅读(235) 评论(0) 推荐(0)
摘要:Remove the minimum number of invalid parentheses in order to make the input string valid. Return all possible results. Note: The input string may cont 阅读全文
posted @ 2016-10-23 10:06 北叶青藤 阅读(271) 评论(0) 推荐(0)
摘要:Closest Binary Search Tree Value Given a non-empty binary search tree and a target value, find the value in the BST that is closest to the target. Not 阅读全文
posted @ 2016-10-18 11:24 北叶青藤 阅读(233) 评论(0) 推荐(0)
摘要:Given an unsorted array return whether an increasing subsequence of length 3 exists or not in the array. Formally the function should: Return true if 阅读全文
posted @ 2016-10-17 10:58 北叶青藤 阅读(125) 评论(0) 推荐(0)
摘要:Given a list of airline tickets represented by pairs of departure and arrival airports [from, to], reconstruct the itinerary in order. All of the tick 阅读全文
posted @ 2016-10-17 09:40 北叶青藤 阅读(269) 评论(0) 推荐(0)
摘要:Given a sorted positive integer array nums and an integer n, add/patch elements to the array such that any number in range [1, n]inclusive can be form 阅读全文
posted @ 2016-10-16 12:03 北叶青藤 阅读(244) 评论(0) 推荐(0)
摘要:Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), write a function to check whether these edges mak 阅读全文
posted @ 2016-10-14 02:56 北叶青藤 阅读(269) 评论(0) 推荐(0)
摘要:There are a total of n courses you have to take, labeled from 0 to n - 1. Some courses may have prerequisites, for example to take course 0 you have t 阅读全文
posted @ 2016-10-11 11:48 北叶青藤 阅读(390) 评论(0) 推荐(0)
摘要:Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. 阅读全文
posted @ 2016-10-11 11:09 北叶青藤 阅读(324) 评论(0) 推荐(0)
摘要:Strobogrammatic Number I A strobogrammatic number is a number that looks the same when rotated 180 degrees (looked at upside down). Write a function t 阅读全文
posted @ 2016-10-10 08:48 北叶青藤 阅读(310) 评论(0) 推荐(0)
摘要:You are given a m x n 2D grid initialized with these three possible values. -1 - A wall or an obstacle. 0 - A gate. INF - Infinity means an empty room 阅读全文
posted @ 2016-10-10 07:37 北叶青藤 阅读(194) 评论(0) 推荐(0)
摘要:Given a binary tree, find the largest subtree which is a Binary Search Tree (BST), where largest means subtree with largest number of nodes in it. Not 阅读全文
posted @ 2016-08-09 10:18 北叶青藤 阅读(271) 评论(0) 推荐(0)
摘要:For a undirected graph with tree characteristics, we can choose any node as the root. The result graph is then a rooted tree. Among all possible roote 阅读全文
posted @ 2016-08-09 09:17 北叶青藤 阅读(221) 评论(0) 推荐(0)

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