摘要: Given a list of non-negative numbers and a target integer k, write a function to check if the array has a continuous subarray of size at least 2 that 阅读全文
posted @ 2018-01-28 11:13 逸朵 阅读(121) 评论(0) 推荐(0)
摘要: Given a non-negative integer, you could swap two digits at most once to get the maximum valued number. Return the maximum valued number you could get. 阅读全文
posted @ 2018-01-28 07:06 逸朵 阅读(104) 评论(0) 推荐(0)
摘要: Given a binary search tree and a node in it, find the in-order successor of that node in the BST. Note: If the given node has no in-order successor in 阅读全文
posted @ 2018-01-28 06:44 逸朵 阅读(106) 评论(0) 推荐(0)
摘要: Given the running logs of n functions that are executed in a nonpreemptive single threaded CPU, find the exclusive time of these functions. Each funct 阅读全文
posted @ 2018-01-28 06:17 逸朵 阅读(260) 评论(0) 推荐(0)
摘要: Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome. Example 1: Example 2: Note: 阅读全文
posted @ 2018-01-28 04:21 逸朵 阅读(101) 评论(0) 推荐(0)
摘要: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example,"A man, a plan, a canal: Pan 阅读全文
posted @ 2018-01-28 03:58 逸朵 阅读(95) 评论(0) 推荐(0)
摘要: Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longestpath betwee 阅读全文
posted @ 2018-01-28 03:45 逸朵 阅读(90) 评论(0) 推荐(0)
摘要: Suppose you are at a party with n people (labeled from 0 to n - 1) and among them, there may exist one celebrity. The definition of a celebrity is tha 阅读全文
posted @ 2018-01-28 03:36 逸朵 阅读(110) 评论(0) 推荐(0)
摘要: 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 retu 阅读全文
posted @ 2018-01-28 03:26 逸朵 阅读(125) 评论(0) 推荐(0)
摘要: Given two sparse matrices A and B, return the result of AB. You may assume that A's column number is equal to B's row number. Example: 阅读全文
posted @ 2018-01-28 03:06 逸朵 阅读(95) 评论(0) 推荐(0)
摘要: Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei), find the minimum number of conference room 阅读全文
posted @ 2018-01-28 02:05 逸朵 阅读(119) 评论(0) 推荐(0)