欢迎fork and star:Nowcoder-Repository-github 133. Clone Graph 题目 Clone an undirected graph. Each node in the gra…
标签:LeetCode题目解答
[LeetCode] Best Time to Buy and Sell Stock II 买股票的最佳时间之二
Say you have an array for which the ith element is the price of a given stock on day i. …
[LeetCode] Surrounded Regions 包围区域,Number of Islands 岛屿的数量,验证LeetCode Surrounded Regions 包围区域的DFS方法
Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'. A region is captured by…
[LeetCode] Move Zeroes 移动零
Given an array nums, write a function to move all 0‘s to the end of it while maintainin…
[LeetCode] Can Place Flowers 可以放置花
Suppose you have a long flowerbed in which some of the plots are planted and some are not. However, flo…
299. Bulls and Cows
You are playing the following Bulls and Cows game with your friend: You write down a number and ask your frien…
[LeetCode] Is Subsequence 是子序列
Given a string s and a string t, check if s is subsequence of t. You may …
[LeetCode] Maximum Vacation Days 最大化休假日
LeetCode wants to give one of its best employees the option to travel among N cities to colle…
[LeetCode] Average of Levels in Binary Tree 二叉树的层平均值
Given a non-empty binary tree, return the average value of the nodes on each level in the form of an ar…
[LeetCode] Valid Tic-Tac-Toe State 验证井字棋状态
A Tic-Tac-Toe board is given as a string array board. Return True if and only if it is possible to…
LeetCode | Reverse Nodes in k-Group
题目: Given a linked list, reverse the nodes of a linked list k at a time and return its modified list…
LeetCode 236 Lowest Common Ancestor of a Binary Tree
题目描述 Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to t…