From 6121563d4217fbb0a3f278e3b5321b845d103bb2 Mon Sep 17 00:00:00 2001 From: Omar Amin Date: Mon, 20 Jul 2020 15:50:24 -0400 Subject: [PATCH 1/2] This question doesn't really utilize topological sorting in the traditional sense, I would suggest removing this tag --- src/data/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/index.js b/src/data/index.js index 252b341f..bf8c641b 100644 --- a/src/data/index.js +++ b/src/data/index.js @@ -1420,7 +1420,7 @@ const questions = [ id: 118, name: 'Minimum Height Trees', url: 'https://leetcode.com/problems/minimum-height-trees/', - pattern: ['BFS', 'Graph', 'Topological Sort'], + pattern: ['BFS', 'Graph'], difficulty: 'Medium', premium: false, companies: ['Google', 'Amazon'], From dc6dd8b78fdce86f99d10b20944a04193775111e Mon Sep 17 00:00:00 2001 From: Omar Amin Date: Wed, 22 Jul 2020 16:27:45 -0400 Subject: [PATCH 2/2] Added new topological sort problem --- src/data/index.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/data/index.js b/src/data/index.js index bf8c641b..00e7bb17 100644 --- a/src/data/index.js +++ b/src/data/index.js @@ -1420,7 +1420,7 @@ const questions = [ id: 118, name: 'Minimum Height Trees', url: 'https://leetcode.com/problems/minimum-height-trees/', - pattern: ['BFS', 'Graph'], + pattern: ['BFS', 'Graph', 'Topological Sort'], difficulty: 'Medium', premium: false, companies: ['Google', 'Amazon'], @@ -2046,6 +2046,15 @@ const questions = [ premium: true, companies: ['Oracle'], }, + { + id: 172, + name: 'Sort Items by Groups Respecting Dependencies', + url: 'https://leetcode.com/problems/sort-items-by-groups-respecting-dependencies/', + pattern: ['DFS', 'Graph', 'Topological Sort'], + difficulty: 'Hard', + premium: false, + companies: ['Google'], + }, ]; const sortBy = { Easy: 0, Medium: 1, Hard: 2 };