Community Profile

photo

Joe Smith


130 2016 이후 총 참여 횟수

Joe Smith's 배지

  • CUP Challenge Master
  • Commenter
  • Solver

세부 정보 보기...

참여 게시물
보기 기준

질문


Jacobi method not working
Not sure what's wrong with my code. It does the first iteration correctly, then goes off in the wrong direction. if true ...

4년 이상 전 | 답변 수: 1 | 0

1

답변

해결됨


Given a window, how many subsets of a vector sum positive
Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

4년 이상 전

해결됨


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

4년 이상 전

해결됨


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년 이상 전

해결됨


Return a list sorted by number of occurrences
Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x. Ties are resolved by a ...

4년 이상 전

해결됨


Reverse Run-Length Encoder
Given a "counting sequence" vector x, construct the original sequence y. A counting sequence is formed by "counting" the entrie...

4년 이상 전

해결됨


Pattern matching
Given a matrix, m-by-n, find all the rows that have the same "increase, decrease, or stay same" pattern going across the columns...

4년 이상 전

해결됨


Elapsed Time
Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

4년 이상 전

해결됨


Trimming Spaces
Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32). Input a = ' singular value deco...

4년 이상 전

해결됨


Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

4년 이상 전

해결됨


Stuff the Board
You have a stack of tiles to put onto an array-like playing board. Each tile has a number (always an integer), and the board var...

4년 이상 전

해결됨


Scoring for oriented dominoes
Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

4년 이상 전

해결됨


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

4년 이상 전

해결됨


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

4년 이상 전

해결됨


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

4년 이상 전

해결됨


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

4년 이상 전

해결됨


Triangle sequence
A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the s...

4년 이상 전

해결됨


Declaring a character
* Assign middleInitial with the character T.

4년 이상 전

해결됨


Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

4년 이상 전

해결됨


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

4년 이상 전

해결됨


Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

4년 이상 전

해결됨


Lightning strike distance: Writing a function
Write a function named LightningDistance that outputs "distance" given input "seconds". Seconds is the time from seeing lightnin...

4년 이상 전

해결됨


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

4년 이상 전

해결됨


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

4년 이상 전

해결됨


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

4년 이상 전

해결됨


Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

4년 이상 전

해결됨


give nth decimal place of pi
max 15th place after the decimal point is ok for now

4년 이상 전

해결됨


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

4년 이상 전

해결됨


Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

4년 이상 전

해결됨


Arrange vector in ascending order
Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];

4년 이상 전

Load more