Tag: c++
A Roomba robot is currently sitting in a Cartesian plane at (0, 0). You are given a list of its moves that it will make, containing NORTH, SOUTH, WEST, …
You are given an integer k and a binary search tree root, where each node is either a leaf or contains 2 children. Find the node containing the value …
Given two sorted linked lists l0, and l1, return a new sorted linked list containing the intersection of the two lists. Constraints n ≤ 100,000 where n is the …
Given two linked lists l0 and l1, return the two linked lists interleaved, starting with l0. If there are leftover nodes in a linked list, they should be added …
Given a string s, return the longest prefix of s that is not equal to s and exists as a suffix of s. Constraints n ≤ 100,000 where n …