I’m trying to go through a linkedlist(which we can call the superlist) which has elements of linked lists(sublists) within it. The method that adds the elements into both linked lists is: Now I have to write methods to check if there are groups of 1, 2, 3, 4 elements in the sublists by traversing the superlist What I have so
Tag: traversal
Depth first search in finding a path in matrix
My understanding about dfs is using stack (bfs using queue). However, if i want to traversal a matrix in dfs. How do I suppose to do that? Suppose I have a matrix and I want to find a path start from top left to bottom right, and it can only move down and right. Above is an online version a