Number of trailing zeros of N 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 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
The challenge The maximum sum subarray problem consists in finding the maximum sum of a contiguous subsequence in an array or list of integers: Easy… Read More »Maximum subarray sum in Java
The challenge Let’s implement the Luhn Algorithm, which is used to help validate credit card numbers. Given a positive integer of up to 16 digits, return true if… Read More »Validate Credit Card Number in Java
The challenge There is an array with some numbers. All numbers are equal except for one. Try to find it! It’s guaranteed that array contains… Read More »Find the unique number using Java
The challenge You are given an array (which will have a length of at least 3, but could be very large) containing integers. The array… Read More »Find The Parity Outlier in Java
The challenge Write a method that takes an array of consecutive (increasing) letters as input and that returns the missing letter in the array. You… Read More »Find the missing letter using Java
The challenge Write a function that takes a string of braces, and determines if the order of the braces is valid. It should return true if the… Read More »Determine the order of braces is valid using Java
The problem It may happen to you that when you try and pull some Java dependencies, you will get the annoying PKIX path building failed:… Read More »Solved: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
The challenge Given an array of integers, find the one that appears an odd number of times. There will always be only one integer that… Read More »How to Find the odd int in Java