Pick peaks 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, …
Read Article →342 articles about java development, tools, and best practices
Write a function that returns the positions and the values of the “peaks” (or local maxima) of a numeric array.
For example, …
Read Article →Write a program that will calculate the number of trailing zeros in a factorial of a given number.
N! = 1 * 2 * 3 * ... * N
Be careful …
Read Article →Consider a “word” as any sequence of capital letters A-Z (not limited to just “dictionary words”). For any word …
Read Article →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 you want to …
Read Article →There is a secret string which is unknown to you. Given a collection of random triplets from the string, recover the original string.
A …
Read Article →A format for expressing an ordered list of integers is to use a comma separated list of either
Complete the solution so that it reverses all of the words within the string passed in.
Example:
ReverseWords.reverseWords("The …
Read Article →
Write a simple CamelCase
method for strings.
All words must have their first letter capitalized without spaces.
// …
Read Article →
Create a function that takes an integer as an argument and returns “Even” for even numbers or “Odd” for odd …
Read Article →You need to square every digit of a number and concatenate them.
For example, if we run 9119 through the function, 811181 will come out, …
Read Article →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 →