PTA: save 007 (upgraded) (30 points)
Title:
In the old movie "Live and Let Die", there is a plot in which 007 is caught by a drug dealer on an island in the center of an crocodile pool. He uses an extremely bold way to escape - directly stepping on the brain bags of a series of crocodiles in the pool and jumping ashore! (it is said that the stuntman was bitten by ...
Posted by heropage on Sun, 28 Nov 2021 10:37:26 -0800
Leetcode 5921. Maximize the path value anonymous function dfs or bfs with bitset in a graph
5921. Maximize the path value in a graph
meaning of the title
Here is an undirected graph with n nodes numbered from 0 to n - 1 (both included). At the same time, give you an integer array values with subscript starting from 0, where values[i] is the value of the ith node. At the same time, give you a two-dimensional integer array edges with su ...
Posted by balacay on Sun, 07 Nov 2021 13:56:59 -0800
Sword finger offer array topic summary (necessary for interview)
Sword finger offer array topic summary (C + + version)
1. Duplicate number in array All numbers in an array num of length n are in the range of 0 ~ n-1. Some numbers in the array are repeated, but I don't know how many numbers are repeated, or how many times each number is repeated. Find any duplicate number in the array. Idea 1: sort first ...
Posted by j115 on Thu, 04 Nov 2021 19:06:44 -0700
Leetcode 785. Judgment bipartite graph (medium)
subject
There is an undirected graph with n nodes. Each of these nodes has a unique number between 0 and n - 1. Give you a two-dimensional array graph, where graph[u] is an array of nodes, which is composed of adjacent nodes of node U. Formally, for each V in graph[u], there is an undirected edge between node u and node v. The undirected graph ...
Posted by proxydude on Fri, 15 Oct 2021 20:10:23 -0700
[Algorithm-LeetCode] 429.Hierarchical traversal of N-fork trees (N-fork trees; Hierarchical traversal; BFS)
429.N-Fork Tree Hierarchical Traversal-Force Button (LeetCode)
Release: September 25, 2021 01:01:25
Problem description and examples
Given an N-fork tree, returns the hierarchical traversal of its node values (that is, from left to right, traverse layer by layer). The serialized input to the tree is traversed in sequence, with each set of ...
Posted by joshblue on Fri, 24 Sep 2021 09:41:58 -0700