随笔分类 - leetcode题解
摘要:题目连接https://leetcode.com/problems/sum-root-to-leaf-numbers/Sum Root to Leaf NumbersDescriptionGiven a binary tree containing digits from 0-9 only, eac...
阅读全文
摘要:题目连接https://leetcode.com/problems/clone-graph/Clone GraphDescriptionClone an undirected graph. Each node in the graph contains a label and a list of i...
阅读全文
摘要:题目连接https://leetcode.com/problems/evaluate-reverse-polish-notation/Evaluate Reverse Polish NotationDescriptionEvaluate the value of an arithmetic expr...
阅读全文
摘要:题目连接https://leetcode.com/problems/reverse-words-in-a-string/Reverse Words in a StringDescriptionGiven an input string, reverse the string word by word...
阅读全文
摘要:题目连接https://leetcode.com/problems/min-stack/Min StackDescriptionDesign a stack that supports push, pop, top, and retrieving the minimum element in con...
阅读全文
摘要:题目连接https://leetcode.com/problems/excel-sheet-column-title/Excel Sheet Column TitleDescriptionGiven a positive integer, return its corresponding colum...
阅读全文
摘要:题目连接https://leetcode.com/problems/majority-element/Majority ElementDescriptionGiven an array of size n, find the majority element. The majority elemen...
阅读全文
摘要:题目连接https://leetcode.com/problems/excel-sheet-column-number/Excel Sheet Column NumberDescriptionRelated to question Excel Sheet Column TitleGiven a co...
阅读全文
摘要:题目连接https://leetcode.com/problems/rotate-array/Rotate ArrayDescriptionRotate an array of n elements to the right by k steps.For example, with n = 7 an...
阅读全文
摘要:题目连接https://leetcode.com/problems/reverse-bits/Reverse BitsDescriptionReverse bits of a given 32 bits unsigned integer.For example, given input 432615...
阅读全文
摘要:题目连接https://leetcode.com/problems/number-of-1-bits/Number of 1 BitsDescriptionWrite a function that takes an unsigned integer and returns the number o...
阅读全文
摘要:题目连接https://leetcode.com/problems/number-of-islands/Number of IslandsDescriptionGiven a 2d grid map of ‘1’s (land) and ‘0’s (water), count the number ...
阅读全文
摘要:题目连接https://leetcode.com/problems/happy-number/Happy NumberDescriptionWrite an algorithm to determine if a number is “happy”.A happy number is a numbe...
阅读全文
摘要:题目连接https://leetcode.com/problems/remove-linked-list-elements/Remove Linked List ElementsDescriptionRemove all elements from a linked list of integers...
阅读全文
摘要:题目连接https://leetcode.com/problems/isomorphic-strings/Isomorphic StringsDescriptionGiven two strings s and t, determine if they are isomorphic.Two stri...
阅读全文
摘要:题目连接https://leetcode.com/problems/reverse-linked-list/Reverse Linked ListDescriptionReverse a singly linked list./** * Definition for singly-linked li...
阅读全文
摘要:题目连接https://leetcode.com/problems/course-schedule/Course ScheduleDescriptionThere are a total of n courses you have to take, labeled from 0 to n−1.Som...
阅读全文
摘要:题目连接https://leetcode.com/problems/binary-tree-paths/Binary Tree PathsDescriptionGiven a binary tree, return all root-to-leaf paths.For example, given ...
阅读全文
摘要:题目连接https://leetcode.com/problems/count-of-smaller-numbers-after-self/Count of Smaller Numbers After SelfDescriptionYou are given an integer array num...
阅读全文
摘要:题目连接https://leetcode.com/problems/implement-trie-prefix-tree/Implement Trie (Prefix Tree)DescriptionImplement a trie with insert, search, and startsWi...
阅读全文

浙公网安备 33010602011771号