Tag: bruteforce algorithm
Given the array nums, for each nums find out how many numbers in the array are smaller than it. That is, for each nums you have to count the …
Implement the class ProductOfNumbers that supports two methods: 1. add(int num) Adds the number num to the back of the current list of numbers. 2. getProduct(int k) Returns the …
Given an integer n. No-Zero integer is a positive integer which doesn’t contain any 0 in its decimal representation. Return a list of two integers where: A and B …
Given a list of intervals, remove all intervals that are covered by another interval in the list. Interval ,,] Output: 2 Explanation: Interval is covered by , therefore it …
A robot on an infinite grid starts at point (0, 0) and faces north. The robot can receive one of three possible types of commands: -2: turn left 90 …