Simple number sequence 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 number missing or there …
Read Article →In-depth guides, insights, and best practices for modern software engineering
You are given a string of numbers in sequence and your task will be to return the missing number. If there is no number missing or there …
Read Article →Create a function taking a positive integer as its parameter and returning a string containing the Roman Numeral representation of that …
Read Article →The action of a Caesar cipher is to replace each plaintext letter (plaintext letters are from ‘a’ to ‘z’ or from ‘A’ …
Read Article →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 …
Read Article →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 …
You are given a non-null array of integers. Implement the method arrayToTree which creates a binary tree from its values in accordance …
Read Article →You will have a list of rationals in the form
{ {numer_1, denom_1} , ... {numer_n, denom_n} }
or
[ [numer_1, denom_1] , ... [numer_n, …
Read Article →
Given a positive number n > 1 find the prime factor decomposition of n. The result will be a string with the following form : …
Read Article →The maximum sum subarray problem consists in finding the maximum sum of a contiguous subsequence in an array or list of integers: …
Read Article →Let’s implement the Luhn Algorithm, which is used to help validate credit card numbers.
Given a positive integer of up to 16 …
Read Article →There is an array with some numbers. All numbers are equal except for one. Try to find it!
Solution.findUniq(new double[]{ 1, 1, 1, 2, …
Read Article →
You are given an array (which will have a length of at least 3, but could be very large) containing integers. The array is either …
Read Article →Write a method that takes an array of consecutive (increasing) letters as input and that returns the missing letter in the array.
You …
Read Article →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 string …
It may happen to you that when you try and pull some Java dependencies, you will get the annoying PKIX path building failed: …
Given an array of integers, find the one that appears an odd number of times.
There will always be only one integer that appears an odd …
Read Article →Write a function that will return the count of distinct case-insensitive alphabetic characters and numeric digits that occur more than …
Read Article →In this challenge, you will be given an integer n and your task will be to return the largest integer that is <= n and has the …
After a long conflict, the rulers of Nek and Glo have decided that a final duel should decide the fate of their countries. Each ruler …
Read Article →Pig Latin is an English language game where the goal is to hide the meaning of a word from people not aware of the rules.
So, the goal …
Read Article →Little Annie is very excited for upcoming events. She want’s to know how many days she have to wait for a specific event.
Your job …
Read Article →If you are using a HashMap to keep a running total of a series of elements, then you often need to increment a HashMap item, but if it doesn’t …
A strongness of an even number is the number of times we can successively divide by 2 until we reach an odd number starting with an even …
Read Article →How many times have we been asked this simple question in our daily lives by family, friends and strangers alike?
In this challenge you …
Read Article →