Find sum of top-left to bottom-right diagonals in Java
The challenge
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 →In-depth guides, insights, and best practices for modern software engineering
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 →Take the following IPv4 address: 128.32.10.1
This address has 4 octets where each octet is a single byte (or 8 bits).
128 has …The drawing shows 6 squares the sides of which have a length of 1, 1, 2, 3, 5, 8. It’s easy to see that the sum of the perimeters …
Read Article →Number is a palindrome if it is equal to the number with digits in reversed order. For example, 5, 44, 171, 4884 are palindromes, and 43 …
You are given an array of strings and your task is to remove all consecutive duplicate letters from each string in the array.
For …
Read Article →Given a list of numbers, determine whether the sum of its elements is odd or even.
Give your answer as a string matching "odd" …