Solved


Percentage of zeros in a matrix of only 1s and 0s
Write a function called _zero_stat_ that takes a matrix as an input that only has 0 and 1 elements. The function needs to comput...

2 months ago

Solved


function to compute root mean square of first nn positive odd integers
Write a function called odd_rms that returns orms, which is the square root of the mean of the squares of the first nn positive ...

2 months ago

Solved


Check if there are white spaces in the input string
If there are white spaces in the input string, output=1 else 0

2 months ago

Solved


Remove white spaces at the end of the input string
Remove all trailing white spaces at the end of the input strings

2 months ago

Solved


Nth root of a number
Given an input and a number N, find the Nth root of the number(s)

2 months ago

Solved


Substring Extraction
In a given string, find the substring between Start_string and End_string. You will have to include or exclude the Start_str...

2 months ago

Solved


Pass the Threshold!!
Write a Matlab function that will take as input a matrix of arbitrary dimensions and a scalar threshold value, and return a vec...

2 months ago

Solved


Nash Equilibrium
In game theory, a player's *strategy* is any of the options that can be chosen in a setting where the pay-off depends not only o...

2 months ago

Solved


Let's Make A Deal: Criminal Minds
The game of Let's Make A Deal proceeds as follows; The player is given the choice of three doors: Behind one door is a car; b...

2 months ago

Solved


Find argmax of a function
You are given vectors x and y (=f(x)). Return the element of x for which f(x) is maximized.

2 months ago

Solved


Let's Make A Deal: The Player's Dilemma
Suppose you're on a game show, and you're given the choice of three doors: Behind one door is a car; behind the others, goats. Y...

2 months ago

Solved


Seperate array to small section according to its index position
Given a integer n, we can generate a sequence [0,1,2,3,4,..., 2^n-1], then we separate it to two sequence according to their ind...

2 months ago

Solved


God of War: The Chains Of Olympus
The Spartan warrior, Kratos, is held by a chain of _n > 1_ links in the underworld. His only chance of survival is to break the ...

2 months ago

Solved


Optimize the Tollbooths
Your company has recently built its own highway from which they hope to generate some revenue. The highway has no branches or in...

2 months ago

Solved


Five Fingers
A little girl has just learnt how to count from 1 to N using the five fingers of her left hand as follows. She starts by calling...

2 months ago

Solved


Counting Squares
An algorithm starts with a single square and on each of its next iterations adds new squares all around the outside as shown bel...

2 months ago

Solved


007: Chinese Barrack Invasion
*MISSION:* Successfully invade a military barrack located in China. *WARNING:* There is a row of _n_ security switches protec...

2 months ago

Solved


The Generalized-N Eggs Problem
A firm has invented a super-strong egg. For publicity purposes, it wants to determine the highest floor in a story building with...

2 months ago

Solved


The Google Interview: Two Eggs Problem
Consider the following problem, a popular Google interview question: A firm has invented a super-strong egg. For publicity pu...

2 months ago

Solved


Sort Reversal
There are n index cards in a row, with n distinct integers written on them (one number per card) so that the numbers are sorted ...

2 months ago

Solved


Sherlock Holmes: The Spy Problem
A guest at a party is a spy if this person is not known by any other guest, but knows all of them. There is at most one spy at a...

2 months ago

Solved


Raise each element to the power of its index in a matrix
In a matrix, A = [1,2;3,4] raise the power of each element like: 1^1+2^3+3^2+4^4 and add it all to produce the result 274

2 months ago

Solved


The Deadly Sin
Melvyn and Banner are fighting over chocolates. Melvyn has X chocolates, while Banner has Y. Whoever has a lesser number of choc...

2 months ago

Solved


Response of First Order Control Systems
In practice, the input signal to an automatic control system is not known ahead of time but usually random in nature. Thus, in t...

2 months ago

Solved


Nodal Voltage of Resistor Ladder Network
* You have a bunch (an even number N) of identical resistors (each R ohms), a good battery (V volts) and a high impedance voltme...

2 months ago

Solved


Computational power of Cody servers
It has been <https://en.wikipedia.org/wiki/Moore%27s_law#History predicted> that the performance of integrated circuits would _d...

2 months ago

Solved


convert the number to binary format & count digits
Convert the given number to the corresponding binary format and count the number of digits in that binary number

2 months ago

Solved


Basics: counting digits of a number irrespective of the sign
publish the number of digits in any input integer example: -23---->2

2 months ago

Solved


Find all repeated numbers
For a given vector, find all numbers that repeated 2 times or more than 2 times. Example: A=[1 2 3 3 4 5 6 6 7] y=[3 ...

2 months ago

Solved


Minimum Maximum Sort Array
sort one array by put minimum value followed by maximum as follow a=[2 3 1 5] and the solution is y=[1 5 2 3 3 2 5 1];

2 months ago

Load more