随笔分类 - leetcode
摘要:标题:Plus One通过率:31.1%难度:简单Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the mos...
阅读全文
摘要:标题:Min Stack通过率:15.2%难度:简单Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x o...
阅读全文
摘要:标题:Binary Tree Level Order Traversal通过率:29.9%难度:简单Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, l...
阅读全文
摘要:标题:Compare Version Numbers通过率:14.8%难度:简单Compare two version numbersversion1andversion1.Ifversion1>version2return 1, ifversion1len2 ? len1:len2; 9 ...
阅读全文
摘要:标题:Majority Element通过率:33.8%难度:简单Given an array of sizen, find the majority element. The majority element is the element that appears more than⌊ n/2 ⌋...
阅读全文
摘要:标题:Pascal's Triangle通过率:30.7%难度:简单GivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], ...
阅读全文
摘要:标题:Excel Sheet Column Number通过率:39.8%难度:简单Related to questionExcel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corr...
阅读全文
摘要:这一段一直忙考试,一直没有刷题,今天上来刷三道题感觉生疏起来了。。罪过啊。刷到今天了。。还是没有写算法的感觉,还是写代码太少了。java的用法又忘记了很多。java上手后就要开始写python了,反正现在就是没有写代码的感觉。题目:Longest Common Prefix通过率:26.5%难度:简...
阅读全文
摘要:标题:Merge Sorted Array通过率:31.1%难度:简单Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough s...
阅读全文
摘要:标题:Symmetric Tree通过率:31.1%难度:简单Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary ...
阅读全文
摘要:标题:Remove Duplicates from Sorted Array通过率:31.9%难度简单Given a sorted array, remove the duplicates in place such that each element appear onlyonceand retu...
阅读全文
摘要:标题:Balanced Binary Tree通过率:32.3%难度:简单Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is define...
阅读全文
摘要:标题:Maximum Depth of Binary Tree通过率:44.2%难度:简单Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest pa...
阅读全文
摘要:标题:Remove Element通过率:32.6%难度:简单Given an array and a value, remove all instances of that value in place and return the new length.The order of elements...
阅读全文
摘要:标题:Merge Two Sorted Lists通过率:33.1%难度:简单Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the...
阅读全文
摘要:标题:Climbing Stairs通过率:34%难度:简单You are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how ma...
阅读全文
摘要:标题:Remove Duplicates from Sorted List通过率:34.5难度:简单Given a sorted linked list, delete all duplicates such that each element appear onlyonce.For example...
阅读全文
摘要:标题:Roman to Integer通过率:34.1%难度:简单Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.这个题整体不是很难,就...
阅读全文
摘要:标题:String to Integer (atoi)通过率:13.8难度:简单Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a...
阅读全文
摘要:标题:Reverse Integer正确率:34.8%难度简单Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321Have you thought about this?Here...
阅读全文

浙公网安备 33010602011771号