题目描述 Given a string containing just the characters ‘(‘ and ‘)’, find the length of the…
分类:LeetCode
LeetCode算法代码笔记(1-5)
给自己的目标:[LeetCode](https://leetcode.com/ "Online Judge Platform") 上每日一题 在做题的过程中记录下解题的思路或者重要的代码碎片以便后来翻阅。 项目源码:gi…
45. Jump Game II
45. Jump Game II 题目 Given an array of non-negative integers, you are initially positioned at the first index o…
[LeetCode] Populating Next Right Pointers in Each Node 每个节点的右向指针
Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; …
LeetCode | Minimum Depth of Binary Tree
题目: Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest p…
[Leetcode] Valid Anagram 验证变形词
Valid Anagram Given two strings s and t, write a function to determine if t is an anagram of s. For example, s…
【leetcode】- Binary Subarrays With Sum(二进制子数组的和问题)
1、题目描述 In an array A of 0s and 1s, how many non-empty subarrays have sum S? Example 1: Input: A = [1,0,1,0,1],…
Remove Substrings
Difficulty : Medium Given a string s and a set of n substrings. You are supposed to remove every instance of t…
[LeetCode] Minimum Window Substring 最小窗口子串
Given a string S and a string T, find the minimum window in S which will contain all the characters in …
[LeetCode] Number of Islands 岛屿的数量
Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island i…
[LeetCode] Super Pow 超级次方
Your task is to calculate ab mod 1337 where a is a positive integer and b is an extremely large positiv…
[LeetCode] Wiggle Subsequence 摆动子序列
A sequence of numbers is called a wiggle sequence if the differences between successive numbers strictl…