統計
All
Feeds
解決済み
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...
約3時間 前
解決済み
Sub-sequence - 03
Given three sequences, find the length of the longest common subsequence. It is similar to the previous problem -- <https...
約5時間 前
解決済み
Sub-sequence - 02
Given two sequences, find the length of the longest common subsequence. a=[1,1,1,1,1,2,3,1,4] b=[2,3,0,0,9,5,4,1] longe...
約6時間 前
解決済み
Sub-sequence - 01
Find the length of the longest increasing subsequence in the given array. a=[2,4,2,1,3,5,6] longest increasing subsequen...
約12時間 前
解決済み
Is this group simply connected?
Given connectivity information about a graph, your job is to figure out if the graph is fully connected. You are given a list of...
約14時間 前
解決済み
Kolakoski Sequence
This is a modified version of the kolakoski sequence. Refer to the problem <https://www.mathworks.com/matlabcentral/cody/p...
約16時間 前
解決済み
Word Ladder
Given a set of words, and two other words - start and destination, Find the smallest chain from start to the destination such...
約17時間 前
解決済み
Quarantine Days
In these quarantine days, a list of what Max may do on a typical day is given in a table with the starting hour to ending hour. ...
約20時間 前
解決済み
The Tortoise and the Hare - 02
Previous problem <https://www.mathworks.com/matlabcentral/cody/problems/45425-the-tortoise-and-the-hare-01> Suppose in an inf...
約21時間 前
解決済み
The Tortoise and the Hare - 01
Suppose in an infinitely long line, the hare is standing in position 0. From that place, it can jump either in the +ve direct...
約21時間 前
解決済み
Split bread like the Pharaohs - Egyptian fractions and greedy algorithm
How would you split 5 loaves of bread among 8 people in all fairness? Get a hint from the Pharaohs. 5/8 = 4/8 + 1/8 , i.e. each ...
約22時間 前
解決済み
Coin Distribution - 02
Prev prob <https://www.mathworks.com/matlabcentral/cody/problems/45385-coin-distribution> Given a set of coins and an amount,...
約22時間 前
解決済み
Coin distribution
Imagine, u r in a shop. ur bill is n(2200). u want to pay the bill with minimum no of coins u have. u've coins of - 2000,1000...
1日 前
解決済み
Calculate the Damerau-Levenshtein distance between two strings.
<http://www.mathworks.co.uk/matlabcentral/cody/problems/2303-compute-hamming-distances-between-each-pair-of-rows-from-two-input-...
1日 前
解決済み
Cryptomath: Addition
W A I T + A L L --------- G I F T S equals: 9 6 0 8 + 6 7 7 --------- 1 0 2 8 5 Given str...
4日 前
解決済み
Balanced Ternary Numbers: Easy as |, |-, |o
This problem concerns the so-called <http://en.wikipedia.org/wiki/Balanced_ternary balanced ternary> system for representing num...
6日 前
解決済み
Break it up! Break it up!
You have N pennies. Write a Matlab script that will reveal how many different ways you can break up those pennies. For example...
6日 前
解決済み
Guess the number I'm thinking of (Part 1)
In this game you are competing against two other people to guess the number that I'm thinking of. I randomly choose an integer ...
6日 前
解決済み
Create a random vector of integers with given sum
Your task today is to write a function that returns a vector of integer numbers, between, and including, 1 and m, of which the s...
8日 前
解決済み
Generate a random matrix A of (1,-1)
Input n: is an positive integer which serves as the dimension of the matrix A; Output: A=(Aij),where each entry Aij is either...
9日 前
解決済み
Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...
9日 前
解決済み
Roll the Dice!
Description Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. Example [x1,x2] = rollDice(...
9日 前
解決済み
Generating random matrix with given probability mass function
Inspired by <http://www.mathworks.com/matlabcentral/cody/problems/2356-simulating-the-selection-of-a-state-with-given-probabilit...
9日 前
解決済み
Find primes and integers that solve an equation
Write a function to find all primes and non-negative integers that solve the equation where is an integer. If there are no...
9日 前
解決済み
Given n, create n random numbers such that their standard deviation is also n.
Given n, create n random numbers such that their standard deviation is also n.
9日 前
解決済み
Compute a sum
Write a function to compute the following sum Although a solution is available for general values of the coefficients, the co...
9日 前
解決済み
Compute the area of a Q
A figure resembling a Q (as in “quadrature”) is constructed in the following way: A right triangle is drawn with the left vertex...
10日 前
解決済み
Compute a sum involving the zeta function
Write a function to compute the sum for , where is the zeta function, the subject of Cody Problems 45939, 45988, and 45997.
13日 前
解決済み
Integrate a power tower
Write a function to compute this integral where . That is, the integrand is (x to the x) to the (x to the x) to the (x to the...
13日 前
解決済み
Count block fountains
A block fountain consists of rows of circles in which each row is a continuous block of circles (i.e., adjacent circles are tang...
15日 前











