Category: BFS
A Stepping Number is an integer such that all of its adjacent digits have an absolute difference of exactly 1. For example, 321 is a Stepping Number while 421 …
Given a binary tree, return the zigzag level order traversal of its nodes’ values. (ie, from left to right, then right to left for the next level and alternate …
Given n processes, each process has a unique PID (process id) and its PPID (parent process id). Each process only has one parent process, but may have one or …
In a given grid, each cell can have one of three values: the value 0 representing an empty cell; the value 1 representing a fresh orange; the value 2 …
A string S represents a list of words. Each letter in the word has 1 or more options. If there is one option, the letter is represented as is. …