Implement Queue using Stacks Implement the following operations of a queue using stacks. push(x) – Push elemen…
分类:LeetCode题目解答
141. Linked List Cycle
欢迎fork and star:Nowcoder-Repository-github 141. Linked List Cycle 题目 Given a linked list, determine if it has …
[LeetCode] Similar RGB Color 相似的红绿蓝颜色
In the following, every capital letter represents some hexadecimal digit from 0 to f. Th…
LeetCode 216 Combination Sum III
题目描述 Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to …
LeetCode 009 Palindrome Number
题目描述 Determine whether an integer is a palindrome. Do this without extra space. 代码 public static boolean isPal…
[LeetCode] Number of Longest Increasing Subsequence 最长递增序列的个数
Given an unsorted array of integers, find the number of longest increasing subsequence. Example 1: Inpu…
[LeetCode] Prefix and Suffix Search 前后缀搜索
Given many words, words[i] has weight i. Design a class WordFilter that supports one function, WordFilt…
LeetCode 205 Isomorphic Strings
题目描述 Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters…
Leetcode讲解视频(持续更新中...)
【Leetcode】146.LRU缓存机制【Leetcode】108.将有序数组转换为二叉搜索树【Leetcode】107.二叉树的层次遍历【Leetcode】106. 从中序与后序遍历序列构造二叉树【Leetcode】…
[Leetcode] Gas Station 加油站
Gas Station There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. Y…
[Leetcode] Factorial Trailing Zeroes 末尾零
Factorial Trailing Zeroes Given an integer n, return the number of trailing zeroes in n!. Note: Your solution …
[Leetcode] Graph Valid Tree 图与树
Graph Valid Tree Given n nodes labeled from 0 to n – 1 and a list of undirected edges (each edge is a pa…