Given two arrays arr1 and arr2, the elements of arr2 are distinct, and all elements in arr2 are also...
Suppose we have a class: public class Foo { public void first() { print("first"); } public...
Given a valid (IPv4) IP address, return a defanged version of that IP address. A defanged IP address...
We distribute some number of candies, to a row of n = num_people people in the following way: We the...
Given a fixed length array arr of integers, duplicate each occurrence of zero, shifting the remainin...
Given words first and second, consider occurrences in some text of the form "first second third...
For two strings s and t, we say "t divides s" if and only if s = t + ... + t (t concatenat...
Students are asked to stand in non-decreasing order of heights for an annual photo. Return the minim...
Given a string S of lowercase letters, a duplicate removal consists of choosing two adjacent and equ...
We have a collection of stones, each stone has a positive integer weight. Each turn, we choose the t...