Tag: stack
Given a singly linked list node whose values are integers, determine whether the linked list forms a palindrome. A palindrome is defined as a sequence whose values are the …
You are given a tree root and a list of strings moves consisting of “RIGHT”, “LEFT” and “UP”. Starting from root, traverse the tree by performing each move in …
You are given an immutable linked list, print out all values of each node in reverse with the help of the following interface: ImmutableListNode: An interface of immutable linked …
Given the root node of a binary search tree (BST) and a value. You need to find the node in the BST that the node’s value equals the given …
Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are …