Solve the Number of Recent Calls Challenge in Java
The challenge
You have a RecentCounter class which counts the number of recent requests within a certain time frame.
Implement the RecentCounter …
In-depth guides, insights, and best practices for modern software engineering
You have a RecentCounter class which counts the number of recent requests within a certain time frame.
Implement the RecentCounter …
Write a program that finds the summation of every number from 1 to num. The number will always be a positive integer greater than 0.
For …
Read Article →Given an array of distinct integers candidates and a target integer target, return a list of all unique combinations of candidates where …
Don Drumphet lives in a nice neighborhood, but one of his neighbors has started to let his house go. Don Drumphet wants to build a wall …
Read Article →Our football team finished the championship. The result of each match look like “x:y”. Results of all matches are recorded …
Read Article →a ,b ,c, return the largest number obtained after inserting the following operators and brackets: +, *, ()Given two integer arrays where the second array is a shuffled duplicate of the first array with one element missing, find the missing …
Read Article →Consider an array/list of sheep where some sheep may be missing from their place. We need a function that counts the number of sheep …
Read Article →You are driving a vehicle that has capacity empty seats initially available for passengers. The vehicle only drives east (ie. it cannot …
Write a function called repeat_str which repeats the given string src exactly count times.
repeatStr(6, "I") // "IIIIII" …
Read Article →
Given an array of integers your solution should find the smallest integer.
For example:
[34, 15, 88, 2] your solution will return …Given a number n, return the number of positive odd numbers below n, EASY!
oddCount(7) //=> 3, i.e [1, 3, 5]
oddCount(15) //=> 7, …
Read Article →