随笔分类 - LeetCode
摘要:1.H-IndexTotal Accepted:19058Total Submissions:70245Difficulty:MediumGiven an array of citations (each citation is a non-negative integer) of a resear...
阅读全文
摘要:Total Accepted:35377Total Submissions:202492Difficulty:MediumGiven a list of non negative integers, arrange them such that they form the largest numbe...
阅读全文
摘要:Total Accepted:43676Total Submissions:111568Difficulty:EasyGiven two stringssandt, write a function to determine iftis an anagram ofs.For example,s= "...
阅读全文
摘要:Total Accepted:22338Total Submissions:97234Difficulty:MediumGiven acompletebinary tree, count the number of nodes.Definition of a complete binary tree...
阅读全文
摘要:Total Accepted:75767Total Submissions:314003Difficulty:MediumImplementint sqrt(int x).Compute and return the square root ofx.(M) Pow(x, n)class Soluti...
阅读全文
摘要:Total Accepted:73922Total Submissions:269855Difficulty:MediumImplement pow(x,n).(M) Sqrt(x)1.递归/*n = 0, 0x = 0 ,x>0,x>1) ; res = res * res; ...
阅读全文
摘要:otal Accepted:54356Total Submissions:357733Difficulty:MediumDivide two integers without using multiplication, division and mod operator.If it is overf...
阅读全文
摘要:Total Accepted:111287Total Submissions:474471Difficulty:EasyReverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321cli...
阅读全文
摘要:Total Accepted:48185Total Submissions:241794Difficulty:HardGiven a string S and a string T, find the minimum window in S which will contain all the ch...
阅读全文
摘要:Total Accepted:45534Total Submissions:226763Difficulty:HardYou are given a string,s, and a list of words,words, that are all of the same length. Find ...
阅读全文
摘要:Total Accepted:53943Total Submissions:209664Difficulty:HardA linked list is given such that each node contains an additional random pointer which coul...
阅读全文
摘要:Total Accepted:53879Total Submissions:190701Difficulty:MediumGiven a linked list and a valuex, partition it such that all nodes less thanxcome before ...
阅读全文
摘要:Total Accepted:57775Total Submissions:198972Difficulty:MediumGiven a singly linked list where elements are sorted in ascending order, convert it to a ...
阅读全文
摘要:otal Accepted:54991Total Submissions:252600Difficulty:MediumGiven a singly linked listL:L0→L1→…→Ln-1→Ln,reorder it to:L0→Ln→L1→Ln-1→L2→Ln-2→…You must ...
阅读全文
摘要:Total Accepted:59422Total Submissions:213019Difficulty:MediumSort a linked list using insertion sort.(M) Sort List/** * Definition for singly-linked l...
阅读全文
摘要:Total Accepted: 59433 Total Submissions: 230628 Difficulty: Medium Given a sorted linked list, delete all nodes that have duplicate numbers, leaving o
阅读全文
摘要:otal Accepted:59473Total Submissions:253637Difficulty:MediumSort a linked list inO(nlogn) time using constant space complexity.(E) Merge Two Sorted Li...
阅读全文
摘要:Total Accepted:55428Total Submissions:250727Difficulty:MediumGiven a list, rotate the list to the right bykplaces, wherekis non-negative.For example:G...
阅读全文
摘要:Total Accepted:48614Total Submissions:185356Difficulty:HardGiven a linked list, reverse the nodes of a linked listkat a time and return its modified l...
阅读全文
摘要:Total Accepted:73777Total Submissions:219963Difficulty:MediumGiven a linked list, swap every two adjacent nodes and return its head.For example,Given1...
阅读全文
浙公网安备 33010602011771号