문제를 풀었습니다


Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

대략 11년 전

문제를 풀었습니다


How many days does the cat take to climb out of the hole?
A cat accidentally falls down a hole with sloping but rough sides. It can climb out of the hole of height h metres, but for ever...

대략 11년 전

문제를 풀었습니다


Find the nearest integer
Given a vector of integers and a real number find the closest integer. EX: >> a = [2 4 5 6 8 10]; >> b = 4.6; >> nea...

대략 11년 전

문제를 풀었습니다


THE CALCULATOR OF LOVE
In honor of Valentine's Day, program a love calculator that figures out the percentage of compatibility between two people using...

대략 11년 전

문제를 풀었습니다


Create matrix of replicated elements
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

대략 11년 전

문제를 풀었습니다


Given two strings, find the maximum overlap
Given two strings s1 and s2, create a new string s3 which is as short as possible and contains both strings. If s1 = [1 2...

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


Calculate the Levenshtein distance between two strings
This problem description is lifted from <http://en.wikipedia.org/wiki/Levenshtein_distance>. The Levenshtein distance betwee...

대략 11년 전

문제를 풀었습니다


Infinite precision division
Develop a function that will divide a very very large integer numerator, supplied to function as a string (e.g., '12233344445555...

대략 11년 전

문제를 풀었습니다


Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...

대략 11년 전

문제를 풀었습니다


Longest Divisor Run
Given the vector a, find the longest run of consecutive numbers that can be evenly divided by the same number d where d > 1. ...

대략 11년 전

문제를 풀었습니다


Multiples of a Number in a Given Range
Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...

대략 11년 전

문제를 풀었습니다


Word Counting and Indexing
You are given a list of strings, each being a list of words divided by spaces. Break the strings into words, then return a maste...

대략 11년 전

문제를 풀었습니다


Make an awesome ramp for a tiny motorcycle stuntman
Okay, given a vector, say v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 3 6 9 11 0; 6 9 ...

대략 11년 전

문제를 풀었습니다


Find matching parenthesis
One of the most indispensable things about a great text editor for programming is the ability to quickly jump between matching p...

대략 11년 전

문제를 풀었습니다


Rotate a Matrix by 90 degrees
Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


Join Strings with Multiple Different Delimiters
The idea is to form the string S by interleaving the elements of a cell array of strings DELIMITER and another cell array of st...

대략 11년 전

문제를 풀었습니다


first step for Huffman Coding (easy)
Given a string, you must sort the characters by occurrence (from lowest to highest). This step is necessary to generate a Huf...

대략 11년 전

문제를 풀었습니다


When can one be the Life Member of the IEEE?
Consult the site http://en.wikipedia.org/wiki/Ieee from where it can be seen that IEEE Members who have reached the age of 65 an...

대략 11년 전

문제를 풀었습니다


Find relatively common elements in matrix rows
You want to find all elements that exist in greater than 50% of the rows in the matrix. For example, given A = 1 2 3 5 ...

대략 11년 전

문제를 풀었습니다


Knight's Tour Checker
Given a matrix a, determine whether or not a legal <http://en.wikipedia.org/wiki/Knight's_tour knight's tour> is present. The kn...

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


The Goldbach Conjecture, Part 2
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

대략 11년 전

문제를 풀었습니다


It's race time! Write a faster function than the test suite call of unique().
Write a function to get unique elements of a vector faster than unique()! Input will be a vector (of integers or floating point ...

대략 11년 전

문제를 풀었습니다


Decoding : Find the value
'u' in the function below is of type char or string and 'v' is of type int or double. function y = your_fcn_name( u, v) ...

대략 11년 전

문제를 풀었습니다


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

대략 11년 전

문제를 풀었습니다


Create One Large Eye of size N x N Quickly?
*<http://en.wikipedia.org/wiki/Aye_(yes) Aye !!!>*

대략 11년 전

더 보기