## Find the Greatest Common Divisor in Java

The challenge Find the greatest common divisor of two positive integers. The integers can be large, so you need to find a clever solution. The… Read More »Find the Greatest Common Divisor in Java

The challenge Find the greatest common divisor of two positive integers. The integers can be large, so you need to find a clever solution. The… Read More »Find the Greatest Common Divisor in Java

The challenge Create a Circular List A circular list is of finite size, but can infititely be asked for its previous and next elements. This… Read More »How to Create a Circular List in Python

The challenge You must guess a sequence and it has something to do with the number given. Example The solution in Java code Option 1:… Read More »How to Guess the Sequence in Java

The challenge Build a function that returns an array of integers from n to 1 where n>0. Example : n=5 –> [5,4,3,2,1] The solution in Java code Option 1:… Read More »Reversed sequence in Java

The challenge Take an integer n (n >= 0) and a digit d (0 <= d <= 9) as an integer. Square all numbers k (0 <= k <= n) between… Read More »Count the Digit in Java

The challenge Create a function multiplyAll/multiply_all which takes an array of integers as an argument. This function must return another function, which takes a single integer as… Read More »Multiply all elements in an array in Java

You have received the dreaded fatal: refusing to merge unrelated histories error! Why does this happen? Git is all about Deltas (the difference between 2… Read More »Fatal: refusing to merge unrelated histories

The challenge Usually when you buy something, you’re asked whether your credit card number, phone number or answer to your most secret question is still… Read More »Credit Card Mask in Java

The challenge Given a number, write a function to output its reverse digits. (e.g. given 123 the answer is 321) Numbers should preserve their sign;… Read More »How to Reverse a Number in Java

The challenge Suppose you have 4 numbers: ‘0’, ‘9’, ‘6’, ‘4’ and 3 strings composed with them: Compare s1 and s2 to see how many positions they have in common: 0 at index… Read More »Positions Average in Java

The challenge What date corresponds to the nth day of the year?The answer depends on whether the year is a leap year or not. Write a function… Read More »Determine the Date by the Day Number in Java

The challenge You have to create a method, that corrects a given time string. There was a problem in addition, so many of the time… Read More »Correct the time-string in Java

The challenge You probably know that some characters written on a piece of paper, after turning this sheet 180 degrees, can be read, although sometimes… Read More »Shifter Words Challenge in Java

The challenge Make two functions, max and min that take a(n) array/vector of integers list as input and outputs, respectively, the largest and lowest number in that array/vector. Examples Additionally… Read More »Find Maximum and Minimum Values of a List in Java

The challenge Write a function that takes a string of parentheses, and determines if the order of the parentheses is valid. The function should return true if… Read More »Valid Parentheses in Java

The challenge Write a function that determines whether a string is a valid guess in a Boggle board, as per the rules of Boggle. A… Read More »Boggle Word Checker in Java

The challenge Your task is to construct a building which will be a pile of n cubes. The cube at the bottom will have a… Read More »Build a pile of Cubes in Kotlin

The challenge Consider the sequence U(n, x) = x + 2x**2 + 3x**3 + .. + nx**n where x is a real number and n a positive… Read More »Which x for that sum in Kotlin

The challenge Write a function that reverses the bits in an integer. For example, the number 417 is 110100001 in binary. Reversing the binary is 100001011 which is 267. You can assume… Read More »Reverse the bits in an integer in Java

The challenge Given a set of numbers, return the additive inverse of each. Each positive becomes negatives, and the negatives become positives. The solution in… Read More »Invert values in Kotlin

You have created a ./target/<app>.jar and have tried to run it using java -jar <app>.jar yet receive a spring boot no main manifest attribute, in… Read More »Spring Boot no main manifest attribute, in

The challenge A number system with moduli is deﬁned by a vector of k moduli, [m1,m2, ···,mk]. The moduli must be pairwise co-prime, which means that, for… Read More »Moduli number system in Kotlin

The challenge Given an array X of positive integers, its elements are to be transformed by running the following operation on them as many times… Read More »Smallest possible sum in Kotlin

The challenge Given a semi-inclusive interval I = [l, u) (l is in interval I but u is not) l and u being floating numbers (0 <= l < u), an integer n… Read More »Floating-point Approximation in Kotlin

The challenge Create an NxN multiplication table, of size provided in parameter. for example, when given size is 3: for given example, the return value should be: [[1,2,3],[2,4,6],[3,6,9]]… Read More »Multiplication table in Kotlin