Determine the Highest Scoring Word in Java
The challenge
Given a string of words, you need to find the highest scoring word.
Each letter of a word scores points according to its position in the …
Read Article →In-depth guides, insights, and best practices for modern software engineering
Given a string of words, you need to find the highest scoring word.
Each letter of a word scores points according to its position in the …
Read Article →In John’s car the GPS records every s seconds the distance travelled from an origin (distances are measured in an arbitrary but …
Create an application that will display the number of kilometers per liter (output) based on the number of miles per imperial gallon …
Read Article →Given a non-negative integer, return an array / a list of the individual digits in order.
Examples:
123 => [1,2,3]
1 => [1] …
Read Article →
Find the greatest common divisor of two positive integers. The integers can be large, so you need to find a clever solution.
The inputs …
Read Article →Create a Circular List
A circular list is of finite size, but can infititely be asked for its previous and next elements. This is …
Read Article →You must guess a sequence and it has something to do with the number given.
x = 16
result = [1, 10, 11, 12, 13, 14, 15, 16, 2, …
Read Article →
Build a function that returns an array of integers from n to 1 where n>0.
Example : n=5 –> [5,4,3,2,1]
Take an integer n (n >= 0) and a digit d (0 <= d <= 9) as an integer. Square all numbers k (0 <= k <= n) between 0 and n. …
Create a function multiplyAll/multiply_all which takes an array of integers as an argument. This function must return another function, …
You have received the dreaded fatal: refusing to merge unrelated histories error!
You might find yourself asking one of the following questions:
Usually when you buy something, you’re asked whether your credit card number, phone number or answer to your most secret question …
Read Article →Given a number, write a function to output its reverse digits. (e.g. given 123 the answer is 321)
Numbers should preserve their sign; …
Read Article →Suppose you have 4 numbers: '0', '9', '6', '4' and 3 strings composed with them:
s1 = "6900690040"
s2 = "4690606946"
s3 …
Read Article →
What date corresponds to the nth day of the year?
The answer depends on whether the year is a leap year or not.
Write a function that …
Read Article →You probably know that some characters written on a piece of paper, after turning this sheet 180 degrees, can be read, although …
Read Article →Make two functions, max and min that take a(n) array/vector of integers list as input and outputs, respectively, the largest and lowest …
Write a function that takes a string of parentheses, and determines if the order of the parentheses is valid. The function should return …
Read Article →Write a function that determines whether a string is a valid guess in a Boggle board, as per the rules of Boggle. A Boggle board is a 2D …
Read Article →Your task is to construct a building which will be a pile of n cubes. The cube at the bottom will have a volume of n^3, the cube above …
Read Article →Consider the sequence U(n, x) = x + 2x**2 + 3x**3 + .. + nx**n where x is a real number and n a positive integer.
When n goes to …
Write a function that reverses the bits in an integer.
For example, the number 417 is 110100001 in binary. Reversing the binary is …
Given a set of numbers, return the additive inverse of each. Each positive becomes negatives, and the negatives become positives. …
Read Article →