Solving the Rule of Divisibility by 13 in Java
The challenge
wikipedia.com
When you divide the successive powers of 10 by 13 you get the following remainders of the integer divisions:
1, 10, 9, …
In-depth guides, insights, and best practices for modern software engineering
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 →The goal is to create a function that removes the first and last characters of a string. You don’t have to worry with strings with …
Read Article →