11.1 (DFS, BFS)130. Surrounded Regions (DFS)class Solution { static int[] dx = {1, 0, -1, 0}, dy = {0, 1, 0, -1}; int n, m; public void solve(char[][] board) { // flood fill algorithm. (dfs / bfs) i…
LeetCode 每日一题 Daily Challenge 1305 All Elements in Two Binary Search Trees 188 1 1:34 App LeetCode 每日一题 Daily Challenge 669 Trim a Binary Search Tree 189 -- 4:44 App LeetCode 每日一题 Daily Challenge 968 Binary Tree Cameras 221 -- 3:42 App LeetCode 每日一题 Daily Challenge...
LeetCode 每日一题 Daily Challenge 442 Find All Duplicates in an Array 151 -- 1:37 App LeetCode 每日一题 Daily Challenge 389 Find the Difference 143 -- 3:13 App LeetCode 每日一题 Daily Challenge 409 Longest Palindrome 122 -- 2:29 App LeetCode 每日一题 Daily Challenge 70 Climbing Sta...
Hi, I started doing leetcode daily challenges video streams. Please follow me if you are interested in solving daily leetcode challenges and becoming consistent. https://www.twitch.tv/sahilbansal17 Hope it proves to be helpful for you. Regards Sahil...
Leetcode Daily Challenge (Nov.) 11.1 (DFS, BFS)classSolution{staticint[]dx={1,0,-1,0},dy={0,1,0,-1};intn,… 阅读全文 leetcode 31~40(更新ing) classSolution{public:voidnextPermutation(vector<int>&nums){intidx=n… 阅读全文 ...
725. Split Linked List in Parts.cpp 726. Number of Atoms.cpp 735. Asteroid Collision.cpp 739. Daily Temperatures.cpp 74. Search a 2D Matrix.cpp 744. Find Smallest Letter Greater Than Target.cpp 746. Min Cost Climbing Stairs.cpp 75. Sort Colors.cpp 752. Open the Lock.cpp ...
75 Hard Challenge - Daily LeetCode Coding Challenge Overview 🏆 75 Hard Challenge is a commitment to self-improvement and discipline. It consists of the following daily tasks: 💪 Workout: Engage in a daily physical workout to enhance your fitness. 📚 Reading/Coding: Solve one or two Lee...
next = next def sortList(head): if not head or not head.next: return head # Find the middle of the linked list slow, fast = head, head.next while fast and fast.next: slow = slow.next fast = fast.next.next mid = slow.next slow.next = None # Recursively sort the left and ...
Merge K sorted list Convert a min heap to max heap 题目 【LeetCode】Daily Coding Challenge 124. 二叉树中的最大路径和 分析: 假如给我一个二叉树root, 利用已有掌握知识,(数学几何都是利用已知识信息 推到更复杂信息) 我能计算出roo为根节点高度/深度/路径。最大路径。9 -10 20 15组成的链表(类比heg...
DailyChallenge 350. 两个数组的交集 II Easy20200713 题目描述 给定两个数组,编写一个函数来计算它们的交集。 示例1: 输入: nums1 = [1,2,2,1], nums2 = [2,2] 输出: [2,2] 示例2: 输入: nums1 = [4,9,5], nums2 = [9,4,9,8,4] 输出: [4,9] 说明: 输出结果中每个元素出现的次数...