摘要:
leetcode -Move ZeroesGiven an arraynums, write a function to move all0's to the end of it while maintaining the relative order of the non-zero element... 阅读全文
摘要:
leetcode -Ugly NumberWrite a program to check whether a given number is an ugly number.Ugly numbers are positive numbers whose prime factors only incl... 阅读全文
摘要:
leetcode -Sort ColorsGiven an array withnobjects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors... 阅读全文
摘要:
leetcode -Product of Array Except SelfGiven an array ofnintegers wheren> 1,nums, return an arrayoutputsuch thatoutput[i]is equal to the product of all... 阅读全文
摘要:
leetcode -Convert Sorted Array to Binary Search TreeGiven an array where elements are sorted in ascending order, convert it to a height balanced BST./... 阅读全文
摘要:
leetcode -Valid AnagramGiven two stringssandt, write a function to determine iftis an anagram ofs.For example,s= "anagram",t= "nagaram", return true.s... 阅读全文
摘要:
leetcode - Lowest Common Ancestor of a Binary Search TreeGiven a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in... 阅读全文
摘要:
leetcode -Minimum Path SumGiven amxngrid filled with non-negative numbers, find a path from top left to bottom right whichminimizesthe sum of all numb... 阅读全文