Simple string expansion in Java
The challenge
Consider the following expansion:
// because "ab" repeats 3 times
solve("3(ab)") == "ababab"
// because …
Read Article →
342 articles about java development, tools, and best practices
Consider the following expansion:
// because "ab" repeats 3 times
solve("3(ab)") == "ababab"
// because …
Read Article →
A Hamming number is a positive integer of the form 2i3j5k, for some non-negative integers i, j, and k.
Read Article →Consider the following array:
[1, 12, 123, 1234, 12345, 123456, 1234567, 12345678, 123456789, 12345678910, 1234567891011...]
If we join …
Read Article →Create a RomanNumerals class that can convert a roman numeral to and from an integer value. It should follow the API demonstrated in the …
Read Article →Given a number of points on a plane, your task is to find two points with the smallest distance between them in linearithmic O(n log n) …!-->
Read Article →Given a square matrix (i.e. an array of subarrays), find the sum of values from the first value of the first array, the second value of …
Read Article →You will be given a list of strings representing nodes in a rooted tree. A visual representation of a very simple rooted tree could be: …!-->!-->
Read Article →A pangram is a sentence that contains every single letter of the alphabet at least once. For example, the sentence “The quick …
Read Article →In this challenge you are given a string for example:
"example(unwanted thing)example"
Your task is to remove everything inside …
Read Article →Return the century of the input year. The input will always be a 4 digit string, so there is no need for validation.
An ordered sequence of numbers from 1 to N is given. One number might have deleted from it, then the remaining numbers were mixed. Find …
Read Article →In this challenge, we are going to reverse a string while maintaining the spaces (if any) in their original place.
For example: …
Read Article →