How to solve the House Robber Challenge in Java
The challenge
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 →342 articles about java development, tools, and best practices
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 →There are N children standing in a line. Each child is assigned a rating value.
You are giving candies to these children subjected to …
Read Article →You have n
candies
, the i<sup>th</sup>
candy is of type candies[i]
.
You want to distribute the candies equally between a …
Read Article →You are given an array representing a row of seats
where seats[i] = 1
represents a person sitting in the i<sup>th</sup> …
Write a function which takes a number and returns the corresponding ASCII char for that value.
Example:
Ascii.getChar(65) // => …
Read Article →