Shortest PrefixesDescriptionA prefix of a string is a substring starting at the beginning of the given string. The prefixes of “carbon” are: “c”, “ca”... ...
分类:
其他好文 时间:
2020-02-06 14:27:50
阅读次数:
78
Given a non-empty array of integers, return the k most frequent elements. Example 1: Input: nums = [1,1,1,2,2,3], k = 2 Output: [1,2] Example 2: Input ...
分类:
其他好文 时间:
2020-02-06 14:26:57
阅读次数:
65
Given two binary search trees root1 and root2. Return a list containing all the integers from both trees sorted in ascending order. Example 1: Input: ...
分类:
其他好文 时间:
2020-02-06 10:51:59
阅读次数:
43
141. Linked List Cycle Given a linked list, determine if it has a cycle in it. To represent a cycle in the given linked list, we use an integer pos wh ...
分类:
其他好文 时间:
2020-02-06 10:30:04
阅读次数:
64
二叉树之字形层序遍历。题意是给一个二叉树,对其进行层序遍历,但是在遍历每一层的时候要一次从左开始一次从右开始。例子, Given binary tree [3,9,20,null,null,15,7], 3 / \ 9 20 / \ 15 7 return its zigzag level orde ...
分类:
其他好文 时间:
2020-02-06 10:24:34
阅读次数:
81
125. Valid Palindrome Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. Note : For the pur ...
分类:
其他好文 时间:
2020-02-05 23:49:36
阅读次数:
129
题目来源 Given three integers A, B and C in [?], you are supposed to tell whether A+B>C. Input Specification: The first line of the input gives the positi ...
分类:
编程语言 时间:
2020-02-05 21:51:51
阅读次数:
72
题目来源 The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair ...
分类:
编程语言 时间:
2020-02-05 18:43:00
阅读次数:
78
Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the s ...
分类:
其他好文 时间:
2020-02-05 17:58:35
阅读次数:
87
Given 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 would have ex ...
分类:
其他好文 时间:
2020-02-05 13:35:52
阅读次数:
62