Solved


Vector addition
Given two row vectors, v1 and v2, each representing an integer, such that the vector elements are the digits from left to right,...

meer dan 4 jaar ago

Solved


Twin Primes
Twin primes are pairs of primes that are immediately next to each other (difference of two). The lesser of twin primes are 3, 5,...

meer dan 4 jaar ago

Solved


Pig Latin to English Translator
Pig latin is a faux-language based off of English. The rules are as follows (excerpted from the <http://en.wikipedia.org/wiki/Pi...

meer dan 4 jaar ago

Solved


English to Pig Latin Translator
Pig latin is a faux-language based off of English. The rules are as follows (excerpted from the wikipedia entry for Pig Latin): ...

meer dan 4 jaar ago

Solved


Transposition as a CIPHER
This all about transcripting a text message. If the input string is: *s1 = 'My name is Sourav Mondal'*, then the output is: *s2...

meer dan 4 jaar ago

Solved


Without the French accent please!
Suppress the French accent. Example 'Déjà présent' -> 'Deja present'

meer dan 4 jaar ago

Solved


For a rectangle, if x is the length and 2x is width. Then find out x from the area of the rectangle?
For a rectangle, if x is the length and 2x is the width. Then find out x from the area of the rectangle? if the area is equal...

meer dan 4 jaar ago

Solved


Probability of red tulips (at both ends of a row)
I planted tulip bulbs in a row on my flower bed. I thought that I had planted white tulips all. However, later, it turned out t...

meer dan 4 jaar ago

Solved


Probability of red tulips
I hope to give you bulbs of tulip. But I do not know the color of those petals. I just know that the color is red, white or yell...

meer dan 4 jaar ago

Solved


Gauss Eliminate 2-by-2 example
Use forward elimination to make the coefficient matrix, A, an upper triangular matrix, and then solve using back substitution, f...

meer dan 4 jaar ago

Solved


Average of even-numbered columns
Given a vector, find the average of even-numbered columns. e.g x = [ 4 6 8 9 1 2 7 ] y = ( 6 + 9 + 2 ) / 3

meer dan 4 jaar ago

Solved


Delete the column with all 0 in the TABLE
In the given table (T), delete the column with all 0 data. e.g. input Banana Apple Orange Mellon __...

meer dan 4 jaar ago

Solved


longest common substring : Skipped character version
Two strings are given. Find the longest common substring between them. The substring characters need not be adjacent. They, howe...

meer dan 4 jaar ago

Solved


Eliminate Polysyllabics: Long live short words!
Given a string s1, return s2 in which all the words with more than one syllable have been removed. To make things simple, we ...

meer dan 4 jaar ago

Solved


Backslang, odds are you used it at some point in time...
So backslang is a language that can be used to communicate in an easy decode code, if people know the rules of decoding it. Wel...

meer dan 4 jaar ago

Solved


Make a list string
Given a cell string, produce a string separating the items with spaces and commas and with an 'and' preceding the final item, an...

meer dan 4 jaar ago

Solved


Beauty of Parentheses
Given a string consisting of closed parentheses, form a string array in the following way so that the orders of these parenthese...

meer dan 4 jaar 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...

meer dan 4 jaar 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...

meer dan 4 jaar ago

Solved


Create cell array of numeric arrays
Convert the input to a cell array, but only if necessary. If the input is a numeric array, return a 1-by-1 cell array contain...

meer dan 4 jaar ago

Solved


Create cell array of strings
Convert the input to a cell array, but only if necessary. If the input is a string, return a 1-by-1 cell array containing the...

meer dan 4 jaar ago

Solved


Word Distance - Average Sort
Based on the method of <https://www.mathworks.com/matlabcentral/cody/problems/44815-word-distance-sum this problem>, write a fun...

meer dan 4 jaar 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...

meer dan 4 jaar ago

Solved


Permute the unique values of a vector without sorting
Given a vector A, return the matrix B, wherein each row contains a permutation of the unique values in original vector while ret...

meer dan 4 jaar ago

Solved


sort matrix
Given a matrix, sort it for each column, but cannot change the element of each row. for example input = [1 3; 2 4;1 5;3 6]; ...

meer dan 4 jaar ago

Solved


Phonebook-like problem
strcmpi('Yes', 'No')

meer dan 4 jaar ago

Solved


Sort (high on middle, low on ends)
Sort the vector of numbers in order low-high-low. Even numbers appear in ascending order on the left and odd numbers appear in d...

meer dan 4 jaar ago

Solved


A different counting method
Given an array (x) of integers, the "counting" array (y) is showing the number of identical consecutive integers in x in front o...

meer dan 4 jaar ago

Solved


Counting Sequence
Given a vector x, find the "counting sequence" y. A counting sequence is formed by "counting" the entries in a given sequence...

meer dan 4 jaar ago

Solved


Number construction II
Given a positive integer, n, return a, b, c and d, such that 1. n = a*2^b+c*3^d 2. a, b, c and d are all positive integers...

meer dan 4 jaar ago

Load more