Community Profile

photo

kirti singh


78 total contributions since 2019

kirti singh's Badges

  • Commenter

View details...

Contributions in
View by

Solved


Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

21 giorni ago

Solved


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

24 giorni ago

Solved


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

24 giorni ago

Solved


Make a Palindrome Number
Some numbers like 323 are palindromes. Other numbers like 124 are not. But look what happens when we add that number to a revers...

26 giorni ago

Solved


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

28 giorni ago

Solved


Renaming a field in a structure array
MATLAB has a <http://www.mathworks.com/help/techdoc/ref/setfield.html setfield> and a <http://www.mathworks.com/help/techdoc/ref...

circa un mese ago

Solved


Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

circa un mese ago

Solved


Duplicates
Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...

circa un mese ago

Solved


Summing Digits within Text
Given a string with text and digits, add all the numbers together. Examples: Input str = '4 and 20 blackbirds baked in a...

circa un mese ago

Solved


Alphabetize by last name
Given a list of names in a cell array, sort the list by the last name. So if list = {'Barney Google','Snuffy Smith','Dagwood ...

circa un mese ago

Solved


Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

circa un mese ago

Solved


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

circa un mese ago

Solved


Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

circa un mese ago

Solved


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

circa 2 mesi ago

Solved


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

circa 2 mesi ago

Solved


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

circa 2 mesi ago

Solved


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

circa 2 mesi ago

Solved


Create a vector
Create a vector from 0 to n by intervals of 2.

circa 2 mesi ago

Solved


Building matrices
If you have matrix A, create matrix B using matrix A as an "element" A = [1 2 3 4; 5 6 7 8...

circa 2 mesi ago

Solved


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

circa 2 mesi ago

Solved


Find max
Find the maximum value of a given vector or matrix.

circa 2 mesi ago

Solved


Is this triangle right-angled?
Given any three positive numbers a, b, c, return true if the triangle with sides a, b and c is right-angled. Otherwise, return f...

circa 2 mesi ago

Solved


Find the maximum number of decimal places in a set of numbers
Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not coun...

circa 2 mesi ago

Solved


Find a Pythagorean triple
Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...

circa 2 mesi ago

Solved


Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

circa 2 mesi ago

Solved


Area of an Isoceles Triangle
An isosceles triangle has equal sides of length x and a base of length y. Find the area, A, of the triangle. <<http://upload...

circa 2 mesi ago

Solved


Dimensions of a rectangle
The longer side of a rectangle is three times the length of the shorter side. If the length of the diagonal is x, find the width...

circa 2 mesi ago

Solved


Side of a rhombus
If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<http://upload.wikimedia.org/wikipe...

circa 2 mesi ago

Solved


Side of an equilateral triangle
If an equilateral triangle has area A, then what is the length of each of its sides, x? <<http://upload.wikimedia.org/wikipe...

circa 2 mesi ago

Solved


Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<http://upload.wikimedia.org/wikipedia/commons/e/e0/Equilateral-tr...

circa 2 mesi ago

Load more