How to Solve the “To square(root) or not to square(root)” Challenge in Java
The challenge
Write a method, that will get an integer array as parameter and will process every number from this array.
Return a new array with …
In-depth guides, insights, and best practices for modern software engineering
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 →You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only …
Read Article →You have an initial power of P, an initial score of ``, and a bag of tokens where tokens[i] is the value of the …
Given an array of integers nums and an integer threshold, we will choose a positive integer divisor and divide all the array by it and …
You will be given a vector of strings. You must sort it alphabetically (case-sensitive, and based on the ASCII values of the chars) and …
Read Article →Given a string s, the power of the string is the maximum length of a non-empty substring that contains only one unique character.
Return …
Read Article →Write a function to convert a name into initials. This challenge strictly takes two words with one space in between them.
The output …
Read Article →Sort a linked list using insertion sort.

A graphical example of insertion sort. The partially sorted list (black) initially contains …!-->
Read Article →