Sum Two Values
Given an array of integers and a value, determine if there are any two integers in the array which sum equal to the given value.
Given an array of integers and a value, determine if there are any two integers in the array which sum equal to the given value.
Given an array (list) of intervals as input where each interval has a start and end timestamps. Input array is sorted by starting timestamps. You are required to merge overlapping intervals and...
So I'm trying to stay true to my resolution, write one or more article about algorithms and datastructure everyday to refresh my memory on how everything works.
It's been a while since I've been writing on the blog, so I've decided to start being more active and since it's been almost 15 years since I've studied this in University, it can also be a good...
A non-empty zero-indexed array A consisting of N integers is given. The array contains an odd number of elements, and each element of the array can be paired with another element that has the same...
A zero-indexed array A consisting of N integers is given. Rotation of the array means that each element is shifted right by one index, and the last element of the array is also moved to the first...
A binary gap within a positive integer N is any maximal sequence of consecutive zeros that is surrounded by ones at both ends in the binary representation of N.
As an avid foodie, I want to eat Fibonachos. I want to see a program that will print the Fibonacci sequence described below so that I can assess how many I can fit on a plate, and assess basic to...
The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices.
Given a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another. Let’s say the phone catalogue listed these numbers:
I had an interview for a job, and one question they asked was how to do something in a language I'm comfortable with.