Find The Parity Outlier in 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 is either …
Read Article →345 articles about java development, tools, and best practices
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 →You have to build a pyramid.
This pyramid should be built from characters from a given string.
You have to create the code for these …
Read Article →Write a simple function that takes polar coordinates (an angle in degrees and a radius) and returns the equivalent cartesian coordinates …
Read Article →Given an array of integers, arr, find out 2 indices m, n(0<=m<=arr.length-1, 0<=n<=arr.length-1, m<=n), so that as long …
Read Article →An abundant number or excessive number is a number for which the sum of its proper divisors is greater than the number itself.
The …
Read Article →Write a function that takes two strings, A and B, and returns the length of the longest possible substring that can be formed from the …
Read Article →Convert an integer which is base 10, to a hexadecimal base 16 string.
Java provides various built-in options such as Integer.toString(a, …
Your task is to programe:
String convertToString(int[] pol) {....} The method returns given by a parameter, (integer array) which …
Write function RemoveExclamationMarks which removes all exclamation marks from a given string.
Option 1:
class …
Read Article →
We need a function that can transform a number into a string.
What ways of achieving this do you know?
Simple, remove the spaces from the string, then return the resultant string.
class Solution {
static …
Read Article →
Suzuki is a monk who climbs a large staircase to the monastery as part of a ritual. Some days he climbs more stairs than others …
Read Article →