Sort by binary ones in Java
The challenge
In this example you need to implement a function that sort a list of integers based on it’s binary representation.
The rules are …
Read Article →342 articles about java development, tools, and best practices
In this example you need to implement a function that sort a list of integers based on it’s binary representation.
The rules are …
Read Article →Write a program that can do some algebra. Write a function expand that takes in an expression with a single, one character variable, and …
You are given an array(list) strarr of strings and an integer k. Your task is to return the first longest string consisting of k …
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 →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 →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, …
Usually when you buy something, you’re asked whether your credit card number, phone number or answer to your most secret question …
Read Article →