LeetCode 128. Longest continuous sequence

Title Description Given an unordered integer array nums, find the length of the longest sequence of consecutive numbers (sequence elements are not required to be continuous in the original array). Please design and implement an algorithm with time complexity O(n) to solve this problem. ExampleUTF-8...

Posted by Baumusu on Sat, 07 Aug 2021 07:05:14 +0930

Ran Bao's daily question -- August 8 -- review of prefix and + topological sorting

Today I want to learn the prefix and, and then learn the topology sorting of yesterday. But what? Let's open the daily question first to see if it's difficult, ha ha ha ha Then, it's really a very simple question. Let's practice Daily question: 1137. N th tibonacci number https://leetcode-cn.coUTF-8...

Posted by roflpwnt on Mon, 09 Aug 2021 04:50:26 +0930

LeetCode Programmer Interview Dictionary Interview Question 04.01. Internode Pathways

subject Solving problems Solution 1: Contiguity Table + Width First Search var findWhetherExistsPath = function(n, graph, start, target) { // Create adjacency table let record = new Map(); for (let [src, des] of graph) { if (record[src]) record[src].add(des); else record[src] = new Set([des]);UTF-8...

Posted by richmlpdx on Mon, 09 Aug 2021 08:15:04 +0930

Force buckle 31 questions: Next Arrange Java Solution Step by Step [Scan once + double pointer]

Title Description To achieve the function of getting the next permutation, the algorithm needs to rearrange the given sequence of numbers into the next larger permutation in the dictionary order. If there is no next larger arrangement, the numbers are rearranged to the smallest (that is, ascendUTF-8...

Posted by Jagand on Mon, 09 Aug 2021 11:55:19 +0930

leetcode of algorithm interview in Dachang 24. Other types of questions

leetcode of algorithm interview in Dachang 24. Other types of questions Video Explanation (efficient learning): Click to learn catalog: 1. Introduction 2. Time and space complexity 3. Dynamic planning 4. Greed 5. Binary search 6. Depth first & breadth first 7. Double pointer 8. Sliding window 9UTF-8...

Posted by foamypup on Tue, 07 Dec 2021 18:57:58 +1030

Java description LeetCode, 452. Minimum Number of Arrows to Burst Balloons break balloons with the least arrows

Hello everyone, I'm hehaige and focus on the back end. If I can, I want to be a code designer instead of an ordinary coder to witness the growth of hehaige. Your comments and praise are my biggest driving force. If you have any mistakes, please don't hesitate to comment. Thank you very much. LeUTF-8...

Posted by ianitm on Tue, 07 Dec 2021 21:23:55 +1030

leetcode of algorithm interview in Dachang 22. Dictionary tree

leetcode of algorithm interview in Dachang 22. Dictionary tree Video Explanation (efficient learning): Click to learn catalog: 1. Introduction 2. Time and space complexity 3. Dynamic planning 4. Greed 5. Binary search 6. Depth first & breadth first 7. Double pointer 8. Sliding window 9. Bit opeUTF-8...

Posted by plutoplanet on Wed, 08 Dec 2021 11:33:53 +1030

[LeetCode binary tree special] maximum key sum of binary search subtree (1373)

1. Title Given a binary tree root, please find the binary search tree with the largest sum of all keys in the binary tree and return the sum of all keys of the corresponding binary tree. Binary search tree is defined as follows: The key value in the left subtree of any node is less than the keUTF-8...

Posted by Pastulio on Wed, 08 Dec 2021 16:39:33 +1030

Li Kou island issue

Island problem is a classical grid search problem, which has a general DFS method. The topics are: leetcode: 200 number of islands, 463 perimeter of islands, 695 maximum area of islands. leetcode200: Give you a chance ' A two-dimensional grid composed of 1 '(land) and 0' (water). Please calculaUTF-8...

Posted by VanHagar on Thu, 09 Dec 2021 07:26:51 +1030

2021-12-08 swipe questions and punch in every day

2021-12-08 swipe questions and punch in every day Force buckle - Sword finger offer Sword finger Offer 12. Path in matrix Given an m x n two-dimensional character grid board and a string word word. If word exists in the grid, return true; Otherwise, false is returned. Words must be formed alphaUTF-8...

Posted by hedge on Thu, 09 Dec 2021 18:00:28 +1030