Community Profile

photo

harsha sri


Last seen: 1 month ago
68 total contributions since 2020

harsha sri's Badges

  • Solver

View details...

Contributions in
View by

Solved


Find the peak 3n+1 sequence value
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

3 months ago

Solved


Remove the polynomials that have positive real elements of their roots.
The characteristic equation for a dynamic system is a polynomial whose roots indicate its behavior. If any of the <http://www.ma...

3 months ago

Solved


Connect Four Win Checker
<http://en.wikipedia.org/wiki/Connect_Four Connect Four> is a game where you try to get four pieces in a row. For this problem, ...

3 months ago

Solved


What is the next step in Conway's Life?
Given a matrix A that represents the state of <http://en.wikipedia.org/wiki/Conway's_Game_of_Life Conway's game of Life> at one ...

3 months ago

Solved


Indexed Probability Table
This question was inspired by a Stack Overflow question forwarded to me by Matt Simoneau. Given a vector x, make an indexed pro...

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

3 months ago

Solved


Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

3 months ago

Solved


Counting in Finnish
Sort a vector of single digit whole numbers alphabetically by their name, in Finnish. See the Wikipedia page for <http://en.wik...

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

3 months ago

Solved


Tic Tac Toe FTW
Given a tic tac toe board: * 1 represents X * 0 represents empty. * -1 represents O It is X's move. If there is an imme...

3 months ago

Solved


Encode Roman Numerals
Create a function taking a non-negative integer as its parameter and returning a string containing the Roman Numeral representat...

3 months ago

Solved


QWERTY coordinates
Given a lowercase letter or a digit as input, return the row where that letter appears on a <http://en.wikipedia.org/wiki/Keyboa...

3 months ago

Solved


Remove all the words that end with "ain"
Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...

3 months ago

Solved


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

3 months ago

Solved


Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

3 months ago

Solved


Function Iterator
Given a handle fh to a function which takes a scalar input and returns a scalar output and an integer n >= 1, return a handle f...

3 months ago

Solved


Scrabble Scores
Given a word, determine its score in <http://en.wikipedia.org/wiki/Scrabble Scrabble>. The input string will always be provi...

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

3 months ago

Solved


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

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

3 months ago

Solved


Find the two most distant points
Given a collection of points, return the indices of the rows that contain the two points most distant from one another. The inpu...

4 months ago

Solved


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

4 months ago

Solved


Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

4 months ago

Solved


Given a 4x4 matrix, swap the two middle columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

4 months ago

Solved


Inner product of two vectors
Find the inner product of two vectors.

4 months ago

Solved


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

4 months ago

Solved


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

4 months ago

Solved


Is my wife right?
Regardless of input, output the string 'yes'.

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

4 months ago

Solved


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

4 months ago

Load more