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.

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

7 years ago

Solved


Product of Each Column
Given a matrix |mat| with |n| columns, return a row vector |v| of length |n|, where every element in |v| is the product of the |...

7 years ago

Solved


Find if a given sentence is a palindrome
Given a string/character array, return true if the string is a palindrome else returns false. For example: sample_text =...

7 years ago

Solved


find the logic,easy one
find the logic behind, example x=18 y=306 x=53 y=2756

7 years ago

Solved


Remove the air bubbles from a vector
_*A reduced version of Problem 112*_ Given a column vector v, return a vector w in which all the zeros have "bubbled" to the ...

7 years ago

Solved


Funny problems
Generate the following vector: if n=1 then q=1; elseif n=2 then q=[2 2 1]; elseif n=3 then q=[3 3 3 2 2 1]; ... end

7 years ago

Solved


Bleed non-zeros to the right
What a title! Yet, it says what I mean. You get a vector, some values and a lot of zeroes. Every zero is replaced by the firs...

7 years ago

Solved


Angle between Two Vectors
The dot product relationship, a dot b = | a | | b | cos(theta), can be used to determine the acute angle between vector a and ve...

7 years ago

Solved


cross in array
Make a cross from "1" in odd size array. Other value from array should be equal to "0"; As input you get length of side of arra...

7 years ago

Solved


Feeling lucky?
Guess which number Cody is thinking (1 to 10)? (This is a game of luck more than skill. Good luck!)

7 years ago

Solved


Sum of series VII
What is the sum of the following sequence: Σ(km^k)/(k+m)! for k=1...n for different n and m?

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

7 years ago

Solved


Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle

7 years ago

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

7 years ago

Solved


Basic Quadratic Equation
Create the equation: y=(3x)^2+(5x)+35 and compute y for various values of x

7 years ago

Solved


Prime Product
My professor has given a sequence of N numbers as a1, a2, ..., aN and asked me to find the smallest possible value of ai * aj su...

7 years ago

Solved


how many of the entries are positive?
Given x= sin(linspace(0,10*pi,100)), how many of the entries are positive?

7 years ago

Solved


Test if a number is numeric or not
Test if a number is numeric or not

7 years ago

Solved


Was ist denn los?
Nur für deutschsprechende Leute! Wie geht's? ...also gut, bis bald!

7 years ago

Solved


Counting votes
x is a vector of votes, e.g. x=[1 2 3 2 2 1 3 2 1 2 2 2 2], who is the winner? 1,2,3?

7 years ago

Solved


Remove the middle element from a vector
Remove the middle element of a vector? *Example:* [1,2,3] should return 2 [1,2,3,4] should return 2 [] should return...

7 years ago

Solved


Finding two missing number in 1 to n array
You are given an array of numbers from 1 to n with two missing numbers. Return the two missing numbers. Input: x=[5 2 0 1 ...

7 years ago

Solved


Find 100 from a Matrix and Replace With 0 with less computation time
pls use this matrix x = [208 40 167 180 112 70 192 215 90 19 231 100 9 100 97 100 ...

7 years ago

Solved


Find Euclidean norm of given vector u.
Find Euclidean norm of given vector u. https://en.wikipedia.org/wiki/Euclidean_distance Example x=[1 1] result=sqrt(1^2+1^2...

7 years ago

Solved


How many digits are there?
Input(s) - any string Output(n) - number of digits within string s

7 years ago

Solved


Second smallest number
What is the second smallest number in x? example: x = [1 2 3 4 5 6 7 8 9] y = 2

7 years ago

Solved


Count number of words in string
Count number of words in string Examples 'hi', answer is 1 'hi hi', answer is 2 'I enjoy cody', answer is 3

7 years ago

Solved


Remove and Sort
Given a randomized array n, sort it and remove all odd integers. n=5 y = [2 4]

7 years ago

Solved


Initialize a Natural Number matrix.
Given length of matrix initialize a matrix consisting of natural numbers from 1 to n: n = 10; x = [ 1 2 3 4 5 6 7 8 9 10]; ...

7 years ago

Load more