关闭
当前搜索:

<LeetCode OJ> 389. Find the Difference

Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more letter at a random position. Find the letter that was...
阅读(981) 评论(0)

<LeetCode OJ> 387. First Unique Character in a String

Total Accepted: 4516 Total Submissions: 10603 Difficulty: Easy Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. Examples: s ...
阅读(1333) 评论(0)

<LeetCode OJ> 382. Linked List Random Node

Given a singly linked list, return a random node's value from the linked list. Each node must have the same probability of being chosen. Follow up: What if the linked list is extremely large and i...
阅读(1357) 评论(0)

<LeetCode OJ> 383. Ransom Note

Given
 an 
arbitrary
 ransom
 note
 string 
and 
another 
string 
containing 
letters from
 all 
the 
magazines,
 write 
a 
function 
that 
will 
return 
true 
if 
the 
ransom 
 note 
can 
be 
constru...
阅读(1970) 评论(0)

<LeetCode OJ> 374. Guess Number Higher or Lower

We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which number I picked. Every time you guess wrong, I'll tell you whether the number is higher...
阅读(2061) 评论(0)

<LeetCode OJ> 371. Sum of Two Integers

Total Accepted: 3722 Total Submissions: 6898 Difficulty: Easy Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. Example: Given a = 1 and b =...
阅读(1363) 评论(0)

<LeetCode OJ> 241. Different Ways to Add Parentheses

Total Accepted: 23674 Total Submissions: 65569 Difficulty: Medium Given a string of numbers and operators, return all possible results from computing all the different possible ways to grou...
阅读(1603) 评论(0)

<LeetCode OJ> 334. Increasing Triplet Subsequence

Total Accepted: 16003 Total Submissions: 46481 Difficulty: Medium Given an unsorted array return whether an increasing subsequence of length 3 exists or not in the array. Formally the func...
阅读(721) 评论(0)

<LeetCode OJ> 318. Maximum Product of Word Lengths

Total Accepted: 23617 Total Submissions: 58995 Difficulty: Medium Given a string array words, find the maximum value of length(word[i]) * length(word[j]) where the two words do not share...
阅读(1836) 评论(0)

<LeetCode OJ> 173. Binary Search Tree Iterator

Total Accepted: 50775 Total Submissions: 144066 Difficulty: Medium Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST. Cal...
阅读(742) 评论(0)

<LeetCode OJ> 357. Count Numbers with Unique Digits

Total Accepted: 450 Total Submissions: 1077 Difficulty: Medium Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x n. Example: Given n = 2, return 91. (Th...
阅读(1055) 评论(0)

<LeetCode OJ> 60. Permutation Sequence

Total Accepted: 56468 Total Submissions: 221337 Difficulty: Medium The set [1,2,3,…,n] contains a total of n! unique permutations. By listing and labeling all of the permutations in orde...
阅读(982) 评论(0)

<LeetCode OJ> 114. Flatten Binary Tree to Linked List

Total Accepted: 84864 Total Submissions: 270352 Difficulty: Medium Given a binary tree, flatten it to a linked list in-place. For example, Given 1 / \ 2 5...
阅读(887) 评论(0)

<LeetCode OJ> 201. Bitwise AND of Numbers Range

Total Accepted: 35859 Total Submissions: 115817 Difficulty: Medium Given a range [m, n] where 0 For example, given the range [5, 7], you should return 4. Credits: Special thanks to @amr...
阅读(730) 评论(0)

<LeetCode OJ> 200 / 130 Number of Islands / Surrounded Regions

Total Accepted: 48411 Total Submissions: 171609 Difficulty: Medium Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and...
阅读(1012) 评论(0)

<LeetCode OJ> 48. Rotate Image

Total Accepted: 69879 Total Submissions: 199786 Difficulty: Medium You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Follow up: Could yo...
阅读(1823) 评论(0)

<LeetCode OJ> 54 / 59 Spiral Matrix( I / II )

Total Accepted: 61182 Total Submissions: 268396 Difficulty: Medium Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. For example, Gi...
阅读(838) 评论(0)

<LeetCode OJ> 106. Construct Binary Tree from Inorder and Postorder Traversal

Total Accepted: 56569 Total Submissions: 193357 Difficulty: Medium Given inorder and postorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not...
阅读(726) 评论(0)

<LeetCode OJ> 105. Construct Binary Tree from Preorder and Inorder Traversal

Total Accepted: 65143 Total Submissions: 224882 Difficulty: Medium Given preorder and inorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not e...
阅读(863) 评论(0)

<LeetCode OJ> 109 / 108 Convert Sorted ( List / Array ) to Binary Search Tree

Total Accepted: 71642 Total Submissions: 233074 Difficulty: Medium Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. Subscri...
阅读(722) 评论(0)
144条 共8页1 2 3 4 5 ... 下一页 尾页
    个人资料
    • 访问:557326次
    • 积分:8154
    • 等级:
    • 排名:第2812名
    • 原创:239篇
    • 转载:52篇
    • 译文:0篇
    • 评论:167条
    博客专栏
    个人介绍
    非CS科班出身,喜欢用C/C++思考数学 ,专注于图像处理和软件开发!本博客基于交流和记录学习的历程为目的,与诸君共勉,欢迎交流。同时,博文有不少文字并非一字一字地敲打,若侵权,请联系本人,

    E-mail:tangyb7172@foxmail.com
    最新评论