Problem https://leetcode.com/problems/flood-fill/ An image is represented by a 2-D array of integers, each integer representing the pixel value of the […]

# Tag: depth-first-search

## templated Depth-FirstSearch algorithm

Problem I have worked on a simple iterative implementation of the common DFS algorithm for my personal template library. The […]

## Code duplication for just an if condition

Problem I have two methods that are near-perfect duplicates. There is of course a code smell. The only thing that […]

## LeetCode: Add and Search Word C#

Problem This is a Leetcode problem: Design a data structure that supports the following two operations: void addWord(word) bool search(word) […]

## DFS on a binary tree: marking nodes as visited

Problem I wanted to write depth first search reversal iteratively in Java. Can someone review my code? I’m not that […]

## LeetCode: Add and Search Word C#

Problem This is a Leetcode problem: Design a data structure that supports the following two operations: void addWord(word) bool search(word) […]

## Breadth- and Depth- First Search in C#

Problem Another recreational implementation for review! As a side comment, for some reason I just feel like if (visited.Contains(vertex)) { […]

## Longest Increasing Path in a Matrix from leetcode

Problem Solved this: Given an integer matrix, find the length of the longest increasing path. From each cell, you can […]

## ExtensionMethods for iterating hierarchically data structures depth/breath-first

Problem I wrote a few simple extension methods that allow to traverse a hierachically data structure depth-first or breath-first using […]

## Java Maze Solver (DFS)

Problem I was asked to create a Java program that will navigate through a series of mazes. I would like […]

- 1
- 2