How to Calculate Age Range Compatibility as an Equation in Java
The challenge
Everybody knows the classic “half your age plus seven” dating rule that a lot of people follow (including myself). …!-->!-->
Read Article →342 articles about java development, tools, and best practices
Everybody knows the classic “half your age plus seven” dating rule that a lot of people follow (including myself). …!-->!-->
Read Article →Let’s call any (contiguous) subarray B (of A) a mountain if the following properties hold:
B.length >= 30 …Given an encoded string, return its decoded string.
The encoding rule is: k[encoded_string], where the encoded_string inside the square …
Given the root of a binary tree, find the maximum value V for which there exist different nodes A and B where V = |A.val - B.val| and A …
Create a function that finds the integral of the expression passed.
In order to find the integral all you need to do is add one to the …
Read Article →Write a function stringy that takes a size and returns a string of alternating '1s' and '0s'.
The string should start with a 1.
A string …
Read Article →Say you have an array for which the ith element is the price of a given stock on day i.
If you were only permitted to complete at most …
Read Article →Write a method, that will get an integer array as parameter and will process every number from this array.
Return a new array with …
wikipedia.com
When you divide the successive powers of 10 by 13 you get the following remainders of the integer divisions:
1, 10, 9, …
Given two strings A and B of lowercase letters, return true if you can swap two letters in A so the result is equal to B, otherwise, …
Given a binary matrix A, we want to flip the image horizontally, then invert it, and return the resulting image.
To flip an image …
Read Article →Given the root of a binary tree, return the sum of every tree node’s tilt.
The tilt of a tree node is the absolute difference …
Read Article →