Solved


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

1 month ago

Solved


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

1 month ago

Solved


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

1 month ago

Solved


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

1 month ago

Solved


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

1 month ago

Solved


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

1 month ago

Solved


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

1 month ago

Solved


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

1 month ago

Solved


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

1 month ago

Solved


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

1 month ago

Solved


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

1 month ago

Solved


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

1 month ago

Solved


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

1 month ago

Solved


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

1 month ago

Solved


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

1 month ago

Solved


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

1 month ago

Solved


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

1 month ago

Solved


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

1 month ago

Solved


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

1 month ago

Solved


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

1 month ago

Solved


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.

1 month ago

Solved


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

1 month ago

Solved


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

1 month ago

Solved


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

1 month ago

Solved


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

1 month ago

Solved


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

1 month ago

Solved


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

1 month ago

Solved


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

1 month ago

Solved


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

1 month ago

Solved


Count Vowels at Even Indices
Write a function `vowelEvenIndices` that counts the number of vowels (a, e, i, o, u) located at even indices (0-based) in a give...

1 month ago

Load more