Category: python
Given an array of integers A, return the largest integer that only occurs once. If no integer occurs once, return -1. Example 1: Input: Output: 8 Explanation: The maximum …
You have some sticks with positive integer lengths. You can connect any two sticks of lengths X and Y into one stick by paying a cost of X + …
There is a special keyboard with all keys in a single row. Given a string keyboard of length 26 indicating the layout of the keyboard (indexed from 0 to …
The zip function in Python 3 takes two parameters, and generate an iterator that contains tuples. Each tuple takes a value from each input – which can be tuples …
A Leap year occurs mostly every 4 years, but every 100 years, we skip a leap year, unless it is divisible by 400. Leap Year Algorithm if (year is …