Category: leetcode online judge
Given an array of integers and an integer k, find out whether there are two distinct indices i and j in the array such that nums = nums and …
Compare two version numbers version1 and version2. If version1 > version2 return 1, if version1 < version2 return -1, otherwise return 0. You may assume that the version strings …
There are N gas stations along a circular route, where the amount of gas at station i is gas. You have a car with an unlimited gas tank and …
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. This is an data-structure problem that you would need to come up with …
For example, Given nums = return 2. Note: Your algorithm should run in linear runtime complexity. Could you implement it using only constant extra space complexity? How many solutions …