Linked List Cycle 描述 分析 代码 相关题目 Linked List Cycle 描述 Given a linked list, determine if it has a cycle in it. Follow up:Can you solve it without using extra space? 分析 ...
Populating Next Right Pointers in Each Node 描述 分析 代码 相关题目 Populating Next Right Pointers in Each Node 描述 Given a binary tree struct TreeLinkNode { int val ; ...
Path Sum II 描述 分析 代码 相关题目 Path Sum II 描述 Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example:Given the bel...
Kth Smallest Element in a BST 描述 分析 解法1 Kth Smallest Element in a BST 描述 Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. ...
Roman to Integer 描述 分析 代码 相关题目 Roman to Integer 描述 Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 分析 从前往后...
Palindrome Number 描述 分析 代码 相关题目 Palindrome Number 描述 Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be ...
Range Sum Query 2D - Immutable 描述 分析 代码 相关题目 Range Sum Query 2D - Immutable 描述 Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its ...