## Sums of Parts in Kotlin

The challenge Let us consider this example (array written in general format): ls = [0, 1, 3, 6, 10] Its following parts: The corresponding sums… Read More »Sums of Parts in Kotlin

The challenge Let us consider this example (array written in general format): ls = [0, 1, 3, 6, 10] Its following parts: The corresponding sums… Read More »Sums of Parts in Kotlin

The challenge In mathematics, a Diophantine equation is a polynomial equation, usually with two or more unknowns, such that only the integer solutions are sought or studied.… Read More »Diophantine Equation in Kotlin

The challenge Write a function that accepts two square matrices (N x N two dimensional arrays), and return the sum of the two. Both matrices being… Read More »Matrix Addition in Java

The challenge The number 81 has a special property, a certain power of the sum of its digits is equal to 81 (nine squared). Eighty… Read More »Numbers that are a power of their sum of digits in Java

The challenge You have to give the number of different integer triangles with one angle of 120 degrees which perimeters are under or equal a… Read More »Integer triangles in Java

The challenge You’re given a square consisting of random numbers, like so: Your job is to calculate the minimum total cost when moving from the… Read More »Minimum path in squares in Java

The challenge Create a function that returns an array containing the first l digits from the nth diagonal of Pascal’s triangle. n = 0 should generate the first diagonal of… Read More »Pascal’s Diagonals in Java

The challenge Given an unsorted array of integer values, find the maximum positive sum of any contiguous range within the array. An array containing only… Read More »Maximum Contiguous Sum in Java

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… Read More »Fibonacci Streaming in Java

The challenge In this challenge you must convert integers numbers from and to a negative-base binary system. Negative-base systems can accommodate all the same numbers… Read More »Base-2 in Java

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 0 and 10. Let’s start with the number 10 and derive the sequence. 10 has digits 1 and 0. The next possible number… Read More »Unique digits sequence in Java

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… Read More »Palindrome integer composition in Java

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… Read More »Count IP Addresses in Java

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… Read More »Shortest Knight Path in Java

The challenge Write a function that makes a list of strings representing all of the ways you can balance n pairs of parentheses Examples The solution in… Read More »All Balanced Parentheses in Java

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,… Read More »Human readable duration format in Java

The challenge Consider the following expansion: Given a string, return the expansion of that string. Input will consist of only lowercase letters and numbers (1… Read More »Simple string expansion in Java

The challenge A Hamming number is a positive integer of the form 2i3j5k, for some non-negative integers i, j, and k. Write a function that computes the nth smallest Hamming number.… Read More »Hamming Numbers in Java

The challenge Consider the following array: If we join these blocks of numbers, we come up with an infinite sequence which starts with 112123123412345123456…. The list… Read More »Block sequence in Java

The challenge Create a RomanNumerals class that can convert a roman numeral to and from an integer value. It should follow the API demonstrated in… Read More »Roman Numerals Helper in Java

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… Read More »Closest pair of points in linearithmic time in Java

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… Read More »Find sum of top-left to bottom-right diagonals in Java

The challenge You will be given a list of strings representing nodes in a rooted tree. A visual representation of a very simple rooted tree could… Read More »Sweeping trees in Java

The challenge A pangram is a sentence that contains every single letter of the alphabet at least once. For example, the sentence “The quick brown… Read More »Detect Pangram in Java

The challenge In this challenge you are given a string for example: Your task is to remove everything inside the parentheses as well as the… Read More »Remove the parentheses in Java