Category: python
Given an array of integers, 1 ≤ a ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements that appear …
A string is called a happy prefix if is a non-empty prefix which is also a suffix (excluding itself). Given a string s. Return the longest happy prefix of …
Given a string S of digits, such as S = “123456579”, we can split it into a Fibonacci-like sequence . Formally, a Fibonacci-like sequence is a list F of …
Given a string s and an integer array indices of the same length. The string s will be shuffled such that the character at the ith position moves to …
Given numBottles full water bottles, you can exchange numExchange empty water bottles for one full water bottle. The operation of drinking a full water bottle turns it into an …