Articles by Tag #dfs

Browse our collection of articles on various topics related to IT technologies. Dive in and explore something new!

Remove Methods from project

Problem TC: O(n*m) where n is the no. of nodes and m is the max no. of nodes/methods present in a...

Learn More 1 0Oct 6 '24

Clone graph

O(n) : where n is no. of nodes Problem /* Definition for a Node. class Node { public int val; ...

Learn More 0 0Mar 20

Minimum obstacle removal to reach corner

TC:O(n*mlog(n*m)) SC :O(n*m) Problem //BFS : dijkstra's class Solution { public int...

Learn More 0 0Jan 18

3543. Maximum Weighted K-Edge Path

Problem BFS: TLE class Solution { public int maxWeight(int n, int[][] edges, int k, int t) { ...

Learn More 0 0May 21

The DFS Copy Trap I discovered in Leetcode 113

What's the difference between paths.append(path) and paths.append(list(path)) where path is a...

Learn More 0 0May 30