Blog Posts

Maximum Contiguous Sum in Java

March 11, 2021

The challenge Given an unsorted array of integer values, find the maximum positive sum of any contiguous range within the array.


Read More

Fibonacci Streaming in Java

March 10, 2021

The challenge You’re going to provide a needy programmer a utility method that generates an infinite sized, sequential IntStream which contains all the numbers in a fibonacci sequence.


Read More

Base-2 in Java

March 9, 2021

The challenge In this challenge you must convert integers numbers from and to a negative-base binary system.


Read More

Unique digits sequence in Java

March 8, 2021

The challenge Consider the following series: 0,1,2,3,4,5,6,7,8,9,10,22,11,20,13,24...There is nothing special between numbers `` and 10.


Read More

Palindrome integer composition in Java

March 7, 2021

The challenge The palindromic number 595 is interesting because it can be written as the sum of consecutive squares: 6^2 + 7^2 + 8^2 + 9^2 + 10^2 + 11^2 + 12^2 = 595.


Read More

Count IP Addresses in Java

March 6, 2021

The challenge Implement a function that receives two IPv4 addresses, and returns the number of addresses between them (including the first one, excluding the last one).


Read More

Shortest Knight Path in Java

March 5, 2021

The challenge Given two different positions on a chess board, find the least number of moves it would take a knight to get from one to the other.


Read More

All Balanced Parentheses in Java

March 4, 2021

The challenge Write a function that makes a list of strings representing all of the ways you can balance n pairs of parentheses


Read More

Human readable duration format in Java

March 3, 2021

The challenge Your task in order to complete this challenge is to write a function which formats a duration, given as a number of seconds, in a human-friendly way.


Read More

Simple string expansion in Java

March 2, 2021

The challenge Consider the following expansion: // because "ab" repeats 3 times solve("3(ab)") == "ababab" // because "a3(b)" == "abbb", which repeats twice.


Read More

Hamming Numbers in Java

March 1, 2021

The challenge A Hamming number is a positive integer of the form 2i3j5k, for some non-negative integers i, j, and k.


Read More

Block sequence in Java

February 28, 2021

The challenge Consider the following array: [1, 12, 123, 1234, 12345, 123456, 1234567, 12345678, 123456789, 12345678910, 1234567891011.


Read More

Roman Numerals Helper in Java

February 27, 2021

The challenge Create a RomanNumerals class that can convert a roman numeral to and from an integer value.


Read More

Closest pair of points in linearithmic time in Java

February 26, 2021

The challenge Given a number of points on a plane, your task is to find two points with the smallest distance between them in linearithmic O(n log n) time.


Read More

Find sum of top-left to bottom-right diagonals in Java

February 25, 2021

The challenge Given a square matrix (i.e. an array of subarrays), find the sum of values from the first value of the first array, the second value of the second array, the third value of the third array, and so on…


Read More

Sweeping trees in Java

February 24, 2021

The challenge You will be given a list of strings representing nodes in a rooted tree.


Read More

Detect Pangram in Java

February 23, 2021

The challenge A pangram is a sentence that contains every single letter of the alphabet at least once.


Read More

Remove the parentheses in Java

February 22, 2021

The challenge In this challenge you are given a string for example:


Read More

What century is it in Java

February 21, 2021

The challenge Return the century of the input year. The input will always be a 4 digit string, so there is no need for validation.


Read More

Lost number in number sequence in Java

February 20, 2021

The challenge An ordered sequence of numbers from 1 to N is given.


Read More