Kth Last Node of a Linked List
Given a singly linked list node, return the value of the kth last node (0-indexed). k is guaranteed not to be larger than the size of the linked list.
Given a singly linked list node, return the value of the kth last node (0-indexed). k is guaranteed not to be larger than the size of the linked list.
You are given an undirected graph friends as an adjacency list, where friends[i] is a list of people i is friends with. Friendships are two-way. Two people a...
Given the mapping "a" = 1, "b" = 2, … "z" = 26, and an encoded message message (as a string), count the number of ways it can be decoded.
Given a complete binary tree root, return the number of nodes in the tree.
Given a singly linked list node, return the value of the middle node. If there’s two middle nodes, then return the second one.
Given a string s representing a boolean expression containing operators "and" and "or", evaluate it and return the result. The expression may have parenthese...
Given a list of time exclusive intervals for different movie showings (possibly overlapping), find the minimum number of theatres required to be able to show...
The “look and say” sequence is defined as follows: beginning with the term 1, each subsequent term visually describes the digits appearing in the previous te...
You are given a list of flights that were taken, represented as origin to destination airport pairs. Given that this list was shuffled, find all the airports...
Given two lists of integers lst0 and lst1, each of length n and where each value is unique to its array and between 0 to n - 1, return the minimum number of ...
Given a two-dimensional matrix of integers, for each zero in the original matrix, replace all values in its row and column with zero, and return the resultin...
You are given a list of strings ops where each element is either: