mrlonelyjtr's blog

写BUG的程序猿


  • Home

  • Categories

  • Archives

  • Tags

  • Search

[Leetcode] Problem 1579 - Remove Max Number of Edges to Keep Graph Fully Traversable

Posted on 2020-10-05 | In Algorithm , LeetCode
Alice and Bob have an undirected graph of n nodes and 3 types of edges: Type 1: Can be traversed by Alice only. Type 2: Can be traversed by Bob only. ...
Read more »

[Leetcode] Problem 1489 - Find Critical and Pseudo-Critical Edges in Minimum Spanning Tree

Posted on 2020-10-05 | In Algorithm , LeetCode
Given a weighted undirected connected graph with n vertices numbered from 0 to n-1, and an array edges where edges[i] = [fromi, toi, weighti] represen ...
Read more »

[Lintcode] Problem 854 - Closest Leaf in a Binary Tree

Posted on 2020-09-23 | In Algorithm , LintCode
Given a binary tree where every node has a unique value, and a target key k. Find the value of the nearest leaf node to target k in the tree. If there ...
Read more »

[Leetcode] Problem 1145 - Binary Tree Coloring Game

Posted on 2020-09-22 | In Algorithm , LeetCode
Two players play a turn based game on a binary tree. We are given the root of this binary tree, and the number of nodes n in the tree. n is odd, and ...
Read more »

[Leetcode] Problem 1319 - Number of Operations to Make Network Connected

Posted on 2020-09-20 | In Algorithm , LeetCode
There are n computers numbered from 0 to n-1 connected by ethernet cables connections forming a network where connections[i] = [a, b] represents a con ...
Read more »

[Leetcode] Problem 1202 - Smallest String With Swaps

Posted on 2020-09-20 | In Algorithm , LeetCode
You are given a string s, and an array of pairs of indices in the string pairs where pairs[i] = [a, b] indicates 2 indices(0-indexed) of the string. Y ...
Read more »

[Leetcode] Problem 1334 - Find the City With the Smallest Number of Neighbors at a Threshold Distance

Posted on 2020-09-17 | In Algorithm , LeetCode
There are n cities numbered from 0 to n-1. Given the array edges where edges[i] = [fromi, toi, weighti] represents a bidirectional and weighted edge b ...
Read more »

[Leetcode] Problem 1129 - Shortest Path with Alternating Colors

Posted on 2020-09-16 | In Algorithm , LeetCode
Consider a directed graph, with nodes labelled 0, 1, …, n-1. In this graph, each edge is either red or blue, and there could be self-edges or paralle ...
Read more »

[Leetcode] Problem 886 - Possible Bipartition

Posted on 2020-09-15 | In Algorithm , LeetCode
Given a set of N people (numbered 1, 2, …, N), we would like to split everyone into two groups of any size. Each person may dislike some other people, ...
Read more »

[Leetcode] Problem 882 - Reachable Nodes In Subdivided Graph

Posted on 2020-09-14 | In Algorithm , LeetCode
Starting with an undirected graph (the “original graph”) with nodes from 0 to N-1, subdivisions are made to some of the edges. The graph is given as f ...
Read more »
1…567…78
mrlonelyjtr

mrlonelyjtr

间歇性踌躇满志,持续性混吃等死

780 posts
18 categories
18 tags
Github
© 2020 mrlonelyjtr
Powered by Hexo
Theme - NexT.Pisces