题目: Determine whether an integer is a palindrome. Do this without extra space. click to show spoilers. Some hi…
分类:LeetCode题目解答汇总
LeetCode | Word Ladder II(单词梯II)
Given two words (start and end), and a dictionary, find all shortest transformation sequence(s) from…
LeetCode | Longest Consecutive Sequence(最长连续序列)
Given an unsorted array of integers, find the length of the longest consecutive elements sequence. For example…
LeetCode | Largest Rectangle in Histogram(直方图围城的最大矩形面积)
Given n non-negative integers representing the histogram’s bar height where the width of each …
LeetCode | Reverse Nodes in k-Group(k个结点一组翻转链表)
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. If…
LeetCode | Single Number(数组中的单个数字)
Given an array of integers, every element appears twice except for one. Find that single one. Note: …
LeetCode | Construct Binary Tree from Preorder and Inorder Traversal
Given preorder and inorder traversal of a tree, construct the binary tree. Note: You may assume that duplicate…
LeetCode | Reverse Words in a String(字符串中的单词序反转)
Given an input string, reverse the string word by word. For example, Given s = “the sky is blue“, …
LeetCode | Add Two Numbers(两个链表相加)
题目: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse ord…
LeetCode | Subsets II(带有重复数据的数组的子集)
Given a collection of integers that might contain duplicates, S, return all possible subsets. Note: Eleme…
LeetCode | Minimum Path Sum(最小路径和)
Given a m x n grid filled with non-negative numbers, find a path from top left to bottom r…
LeetCode | Climbing Stairs(爬楼梯)
You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb …