A unival tree (short for "universal value tree") is a tree in which all nodes have the same value. Given…
Problem Statement (Asked By Facebook) Given the mapping a = 1, b = 2, ..., z = 26, and an…
An XOR-linked list is a memory-efficient version of a doubly linked list. Instead of each node storing separate next and…
Problem Statement (Asked By Jane Street) The function cons(a, b) creates a pair of two elements. Implement two functions: car(pair):…
Problem Statement (Asked By Stripe) You are given an array of integers. Your task is to find the smallest missing…
Given the root of a binary tree, create two functions: serialize(root) - Converts the binary tree into a string representation.…
Problem Statement (Asked By Uber) Given a list of integers, return a new list such that each element at index…
Problem Statement (Asked By Google) Given a list of integers and a target number k, determine if there exist two…