Category: python
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 …
Implement pow(x, n), which calculates x raised to the power n (xn). Example 1: Input: 2.00000, 10 Output: 1024.00000 Example 2: Input: 2.10000, 3 Output: 9.26100 Example 3: Input: …