Gelöst


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

11 Monate vor

Gelöst


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

11 Monate vor

Gelöst


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 ...

11 Monate vor

Gelöst


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...

11 Monate vor

Gelöst


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...

11 Monate vor

Gelöst


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 - ...

11 Monate vor

Gelöst


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

11 Monate vor

Gelöst


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...

11 Monate vor

Gelöst


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

11 Monate vor

Gelöst


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

11 Monate vor

Gelöst


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...

11 Monate vor

Gelöst


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

11 Monate vor

Gelöst


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...

11 Monate vor

Gelöst


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 ...

11 Monate vor

Gelöst


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...

11 Monate vor

Gelöst


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

11 Monate vor

Gelöst


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

11 Monate vor

Gelöst


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

11 Monate vor

Gelöst


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...

11 Monate vor

Gelöst


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...

11 Monate vor

Gelöst


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

11 Monate vor

Gelöst


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.

11 Monate vor

Gelöst


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...

11 Monate vor

Gelöst


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...

11 Monate vor

Gelöst


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...

11 Monate vor

Gelöst


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

11 Monate vor

Gelöst


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...

11 Monate vor

Gelöst


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...

11 Monate vor

Gelöst


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

11 Monate vor

Gelöst


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...

11 Monate vor

Mehr laden