Risolto


Count the Even Digits in a Number
Given a positive integer n, write a function that returns how many digits of n are even. Even digits are: 0, 2, 4, 6, 8

10 mesi fa

Risolto


Rearrange string
Input is a given string. Output is the number of ways to rearrange the string.

10 mesi fa

Risolto


grazing cows
Here is a fun problem I encountered in high school. Two cows are grazing in an enclosed square-shaped field of side length s ...

10 mesi fa

Risolto


row-th maximum row elements
Input a is a square matrix of size n*n. Output vector v is of size 1*n. The ith element of output v is the ith largest element o...

10 mesi fa

Risolto


modular arithmetic
Given three integers a,b and c, find the remainder when a^b is divided by c. Here, a^b will be well beyond the largest 64 bit in...

10 mesi fa

Risolto


Calculate the h-index
H-index is a powerful tool for quantifying the scientific contribution of a researcher. H-index is defined as follows (source - ...

10 mesi fa

Risolto


Battery Charge Indicator
Write a function called battery_charge that visually represents the charge of a battery. The function takes an integer paramete...

10 mesi fa

Risolto


Digits eliminate
Complete the function my_f(n,b) to return, for a given integer, the number obtained by removing the digits '0' and 'b'. If there...

10 mesi fa

Risolto


Spreadsheet Column Number
Spreadsheet uses an alphabetic naming system for columns, starting with 'A', 'B', 'C', etc. The column names continue like 'AB',...

10 mesi fa

Risolto


Reverse Integer
You are given an integer, reverse its digits. For negative integers, the sign should remain in the front. For instance, 12340 s...

10 mesi fa

Risolto


Remove Unique Elements
Given a list of integers, we want to keep only the non-unique elements in this list. To do this, we need to remove all the uniqu...

10 mesi fa

Risolto


Instructions Following
Complete the function follow(s) which, for a given string (containing only the letters 'f', 'b', 'l', 'r'), calculates the final...

10 mesi fa

Risolto


Secret Message and Acrostic
One of the simplest ways to hide a message involves utilizing uppercase letters. Given a text, collect all uppercase letters in...

10 mesi fa

Risolto


Out-of-Place Elements Count
Determine the number of elements in a list of integers that are not in their original order after sorting the list in ascending ...

10 mesi fa

Risolto


Determine if a Digit is Isolated
A digit is considered isolated if both its left and right neighbors are different from itself. For example, in the number 776444...

10 mesi fa

Risolto


Organic Chemistry
Determine the names of the organic component formed with carbon and hydrogen. For example, if n=1 the name is methane

10 mesi fa

Risolto


Wheatstone bridge
Determine if a set of resistors maintain Wheatstone bridge equilibrium

10 mesi fa

Risolto


Find the number of diagonals in a n sided polygon.
Find the number of diagonals in a n sided polygon.

10 mesi fa

Risolto


Breaking up a chocolate bar
You've got a chocolate bar of size , and you want to break it up into bite-sized () pieces. How many steps are required to do th...

10 mesi fa

Risolto


Merge two integers
We want to merge the digits of two integers having the same number of digits to obtain a new integer whose digits are obtained b...

10 mesi fa

Risolto


Perfect shuffle
We call "perfect shuffle" the process of cutting a deck of cards into two equal halves, and then perfectly interleaving them: on...

10 mesi fa

Risolto


Determine if the square root is an integer.
Write code that returns true if perfect square and returns false if square root is not an integer.

10 mesi fa

Risolto


Maximizing Stock Profit
As a stock exchange broker focusing on a single transaction, your goal is to maximize profit by buying a stock at a low price an...

10 mesi fa

Risolto


Replace with Lower
Given a list of integers, for each element, replace it with the minimum integer found in the sub-list to its strict right (exclu...

10 mesi fa

Risolto


My wife's logic
Its is always the opposite of the causality law, that is to say the opposite of the implication relationship in math/logic terms...

10 mesi fa

Risolto


Leave a thumb-up to pass
Just leave a Like, and a comment if you wish. Then wait, and submit.

10 mesi fa

Risolto


Implement the signum function
The signum function is a common mathematical function, which has the following definition : If x => 0, its value is 1, if x < 0...

10 mesi fa

Risolto


Self-similarity 1 - Every other term
Self-similar integer sequences are certain sequences that can be reproduced by extracting a portion of the existing sequence. Se...

10 mesi fa

Risolto


Area of a rectangle
FInd the area of a rectangle with a length L and width W. Round to the nearest integer.

10 mesi fa

Risolto


Integer Division Without Remainder
Write a function that takes two positive integers, a and b, and returns the result of integer division (quotient) without remain...

10 mesi fa

Carica altro