Solved


Non trivial identities - reshape
Return x by reshaping it.

8 years ago

Solved


Non trivial identities - flipping
Return x by flipping it.

8 years ago

Solved


Wrap-around effect
In vector x of length n we define (n+1) position as going back to the first position (so called wrap-around effect). Can you ret...

8 years ago

Solved


Check capital letters
Check if each first letter of a string is a capital letter. for example: 'This Is Ok' gives a true answer and 'This Is not Ok' ...

8 years ago

Solved


Binary Inversion
Given the unsigned 8-bit integer x, return the number y which is the binary inversion of x. For example if x is 5, y should b...

8 years ago

Solved


time difference
The arrays x and y contain time values in the form of: x = [hours minutes seconds] Create the output z which contains the...

8 years ago

Solved


Remove multiples of N
in the vector x remove all multiples of N. x = [1 2 3 4 5 6]; N = 2; Then y = [1 3 5];

8 years ago

Solved


Put all numbers in a string inside square brackets
Examples: 'left3down2' -> 'left[3]down[2]' 'fiat500' -> 'fiat[500]'

8 years ago

Solved


What's my favourite food?
The spicier the better.

8 years ago

Solved


String revert
Revert all words in a sting x for example, if x = 'this is a sentence' then y should be 'sentence a is this'

8 years ago

Solved


X plus binary inverted x
Given a n-bits number x, what is the sum of x to the binary inverted version of x? (this might be more simple than you think :-)...

8 years ago

Solved


sum of ASCII
Given a string x, return the sum of all ASCII numbers of all characters. for example, if x='lala' ('l'-> 108, 'a'->97) then y...

8 years ago

Solved


Calculate vowel / consonant ratio of a string
Given a string, calculate the ratio of vowels to consonants for example : x = 'This is a very good Day!' y = 7/11

8 years ago

Solved


Find the numeric characters in a string and return their index
Given a string S, return the index of any numeric characters. S = 'The next meeting will be held in 2 weeks.'; idx = fin...

8 years ago

Solved


Odd times even numbers in a matrix
First count the number of odd numbers in x, then the number of even. Return their product. example: x = [1 2] One odd ...

8 years ago

Solved


Frequency Analysis of Text
Frequency analysis is a common task in cryptoanalysis. It is essentially counting the occurrences of alphabets (regardless of ca...

8 years ago

Solved


Encode Me From The Past
Given this input x = 2, 5, 1, 2, 4, 1, 1, 3 output should be (Five 2's, Two 1's, One 4, Three 1's) [2 2 2 2 2 1 1 4 1...

8 years ago

Solved


I told you not separate me, but you did :( - ACDC
Given input vector, output it's DC and AC value Example: input = 0 1 -1 0 ac = 0 1 -1 0 dc = 0

8 years ago

Solved


Create a square matrix with given conditions
Create a square matrix, M, which should be populated as follows: M = [ n^2 n * (n-1) n * (n-2) ... n * 2 n * ...

8 years ago

Solved


Modulation index
The amplitude of the carrier signal is 2V and the amplitude of the modulating signal is 8V. Find its modulation index.

8 years ago

Solved


DC-DC boost converter
Find the output voltage of a DC-DC boost converter when its input voltage is 12V and the duty cycle ratio is 0.6.

8 years ago

Solved


Modified Upper Matrix Mock
Given a vector v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 0 3 6 9 11; 0 0 6 9 11; 0 0 0 9 11; 0 0 0...

8 years ago

Solved


Integrate Me
Given polynomial, output the integral (with k = 1 for simplicity purposes) Example: input = [2 1] % 2x+1 output = [1 1 1]...

8 years ago

Solved


Create Truth Table of Size according to input
Create a Truth Table Example: n = 3 output = [0 0 0; 0 0 1; 0 1 0; 0 1 1; 1 0 0; 1 0 1; 1 1 0; 1 1 1]

8 years ago

Solved


Extract part elements of matrix into one new matrix
Given a matrix that includes different nonzero and zero entries, extract the nonzero elements and form a new matrix. The new mat...

8 years ago

Solved


Monty Hall
The classic Monty Hall "Let's Make a Deal" final showcase puzzle pits the contestant against three Doors. Behind one Door are dr...

8 years ago

Solved


Return strings encapsulated by braces
Return all substrings that are contained within braces ({}). For example: str = 'x = rho*x{-1} + (1-rho)*y{+1}'; when...

8 years ago

Solved


Convert array of decimal numbers into binary numbers array.
Convert an array of decimal numbers into binary numbers array. For example: x = [1 2 3 4 5 6 7 8]; result = [1; 10; 11;...

8 years ago

Solved


pizza deals
Given two pizza slices of different sizes: * Slice A with angle alpha1, radius r1, and price p1 * Slice B with angle alpha2,...

8 years ago

Solved


Find the product of the positive elements above the main diagonal.
Example Input A=[1 2; -3 0] Output 2

8 years ago

Load more