题目: Given an array S of n integers, are there elements a, b, c in …
分类:LeetCode题目解答
力扣(LeetCode)142
题目地址:https://leetcode-cn.com/probl…题目描述:给定一个链表,返回链表开始入环的第一个节点。 如果链表无环,则返回 null。 为了表示给定链表中的环,我们使用整数 pos 来…
[LeetCode] Flatten Nested List Iterator 压平嵌套链表迭代器
Given a nested list of integers, implement an iterator to flatten it. Each element is either an integer…
LeetCode | Binary Tree Inorder Traversal
题目: Given a binary tree, return the inorder traversal of its nodes’ values. For example: Given…
【Leetcode】2. Add Two Numbers 两个链表的对应元素加和的新链表
1. 题目 You are given two linked lists representing two non-negative numbers. The digits are stored in reverse o…
49. Group Anagrams
49. Group Anagrams 题目 Given an array of strings, group anagrams together. For example, given: ["eat", "tea", "…
30. Substring with Concatenation of All Words
欢迎fork and star:Nowcoder-Repository-github 30. Substring with Concatenation of All Words 题目 You are given a st…
1. Two Sum
1. Two Sum 题目 Given an array of integers, return indices of the two numbers such that they add up to a specifi…
[LeetCode] Palindrome Number 验证回文数字
Determine whether an integer is a palindrome. An integer is a palindrome when it re…
[LeetCode] Implement Rand10() Using Rand7() 使用Rand7()来实现Rand10()
Given a function rand7 which generates a uniform random integer in the range 1 to 7, write a …
[LeetCode] Max Stack 最大栈
Design a max stack that supports push, pop, top, peekMax and popMax. push(x) — Push elemen…
【leetcode】57. Insert Interval
1. 题目 Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).…