## Find the stray number in Java

The challenge You are given an odd-length array of integers, in which all of them are the same, except for one single number. Complete the method which… Read More »Find the stray number in Java

The challenge You are given an odd-length array of integers, in which all of them are the same, except for one single number. Complete the method which… Read More »Find the stray number in Java

The challenge In a grid of 4 by 4 squares you want to place a skyscraper in each square with only some clues: The height… Read More »4 By 4 Skyscrapers in Java

The problem If you have received the package org.junit.jupiter.api deos not exist error when trying to run a JUnit Java Test with Maven, it’s because… Read More »How to Fix: package org.junit.jupiter.api does not exist

You can easily control the column filtering in ag-Grid by using the getFilterInstance and setModel methods associated to the column you need filtering. Once done,… Read More »How to Programmatically Filter ag-Grid Columns in Angular

The challenge Given an array of positive or negative integers I= [i1,..,in] you have to produce a sorted array P of the form [ [p,… Read More »Sum by Factors in Java

The challenge Count the number of divisors of a positive integer n. Random tests go up to n = 500000. Examples The solution in Java code Option… Read More »Count the divisors of a number in Java

The challenge Inspired from real-world Brainf**k, we want to create an interpreter of that language which will support the following instructions: > increment the data pointer (to… Read More »My smallest code interpreter in Java

The challenge Write a function that returns the positions and the values of the “peaks” (or local maxima) of a numeric array. For example, the… Read More »Pick peaks in Java

The challenge Write a program that will calculate the number of trailing zeros in a factorial of a given number. N! = 1 * 2… Read More »Number of trailing zeros of N in Java

The challenge Consider a “word” as any sequence of capital letters A-Z (not limited to just “dictionary words”). For any word with at least two… Read More »Alphabetic Anagrams in Java

If you find yourself in a position where you have already committed some files to git, and they are in the remote repository already, but… Read More »Remove file from Git without deleting locally

The challenge There is a secret string which is unknown to you. Given a collection of random triplets from the string, recover the original string.… Read More »Recover a secret string from random triplets in Java

The challenge A format for expressing an ordered list of integers is to use a comma separated list of either individual integers or a range… Read More »Range Extraction in Java

The challenge Complete the solution so that it reverses all of the words within the string passed in. Example: The solution in Java code Option… Read More »Reversed Words in Java

The challenge Write a simple CamelCase method for strings. All words must have their first letter capitalized without spaces. Example: The solution in Java code… Read More »CamelCase Method in Java

The challenge Create a function that takes an integer as an argument and returns “Even” for even numbers or “Odd” for odd numbers. The solution… Read More »Even or Odd in Java

The challenge You need to square every digit of a number and concatenate them. For example, if we run 9119 through the function, 811181 will… Read More »Square Every Digit in Java

The challenge You are given a string of numbers in sequence and your task will be to return the missing number. If there is no… Read More »Simple number sequence in Java

The challenge Create a function taking a positive integer as its parameter and returning a string containing the Roman Numeral representation of that integer. Modern… Read More »Roman Numerals Encoder in Java

The challenge The action of a Caesar cipher is to replace each plaintext letter (plaintext letters are from ‘a’ to ‘z’ or from ‘A’ to… Read More »First Variation on Caesar Cipher in Java

The challenge The first century spans from the year 1 up to and including the year 100, The second – from the year 101 up to and including the year 200, etc.… Read More »Century From Year in Java

The challenge You have a positive number n consisting of digits. You can do at most one operation: Choosing the index of a digit in the number, remove this… Read More »Find the Smallest Number in Java

The challenge You are given a non-null array of integers. Implement the method arrayToTree which creates a binary tree from its values in accordance to their order,… Read More »Convert Array to Tree in Java

The challenge You will have a list of rationals in the form where all numbers are positive ints. You have to produce a result in… Read More »Common Denominators in Java

The challenge Given a positive number n > 1 find the prime factor decomposition of n. The result will be a string with the following… Read More »Primes in Numbers in Java