Feeds
문제를 풀었습니다
Plotting Practice
Plot cos(x) vs x as shown in the figure below. Include the appropriate title, x-label, and y-label. Note, it is case sensitive. ...
대략 6시간 전
문제를 풀었습니다
Sieve of Eratosthenes - 02
"Sift the Two's and Sift the Three's, The Sieve of Eratosthenes. When the multiples sublime, The numbers that remain a...
대략 7시간 전
문제를 풀었습니다
Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.
대략 7시간 전
문제를 풀었습니다
Parcel Routing
Given a matrix that represent the distance along highways between major cities numbered 1 to _N_, provide the path and shortest ...
대략 7시간 전
문제를 풀었습니다
Graph Algorithms 3: Number of Connected Components
Given an adjacency matrix of a simple undirected graph, find the number of connected components.
대략 7시간 전
문제를 풀었습니다
FloydWarshall
Our task is to find shortest paths between every pair of nodes. Floyd-Warshall is a graph algorithm for finding shortest paths i...
대략 7시간 전
문제를 풀었습니다
Count the Number of Directed Cycles in a Graph
Given an asymmetric adjacency matrix, determine the number of unique directed cycles. For example, the graph represented by adj...
대략 7시간 전
문제를 풀었습니다
Determine connected components of a graph
Adjacency matrix of an undirected graph is given. Return the number of connected components in the graph.
대략 7시간 전
문제를 풀었습니다
Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...
2일 전
문제를 풀었습니다
Find Rotated Substring
Given a string s1, find if a rotated version of s1 is present in a second string s2. For example, rotated version of some strin...
2일 전
문제를 풀었습니다
Return the first and last characters of a character array
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...
2일 전
문제를 풀었습니다
Decimal Comparison
*Background* A utility of particular interest to Cody and other MATLAB ventures is comparing the equality of two numbers. In ...
2일 전
문제를 풀었습니다
Transposition as a CIPHER
This all about transcripting a text message. If the input string is: s1 = 'My name is Sourav Mondal', then the output is: s2 = '...
2일 전
문제를 풀었습니다
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...
2일 전
문제를 풀었습니다
Find matching string from a list of strings
Write a function that returns a string that is a unique match (if it exists) of the string inStr from a list of strings strList....
2일 전
문제를 풀었습니다
Ordinal numbers
Given an integer n, return the corresponding ordinal number as a character string. For example, ord(1)='1st' ord(2)=...
2일 전
문제를 풀었습니다
Calculate a modified Levenshtein distance between two strings
Inspired by the Cody problem found here. The Levenshtein distance is a charater-based string metric used to measure the differe...
2일 전
문제를 풀었습니다
Guess Cipher
Guess the formula to transform strings as follows: 'Hello World!' --> 'Ifmmp Xpsme!' 'Can I help you?' --> 'Dbo J ifm...
2일 전
문제를 풀었습니다
Find the next prime number
Find the next prime number or numbers for given n. For example: n = 1; out = 2; or n = [5 7]; out = [7 11]; ...
3일 전
문제를 풀었습니다
Make a vector of prime numbers
Input(n) - length of vector with prime numbers Output(v) - vector of prime numbers Example: * n=1; v=2 * n=3; v=[2 3 5...
3일 전
문제를 풀었습니다
Largest Twin Primes
<http://en.wikipedia.org/wiki/Twin_prime Twin primes> are primes p1, p2 = p1 + 2 such that both p1 and p2 are prime numbers. Giv...
3일 전
문제를 풀었습니다
Mersenne Primes
A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...
3일 전
문제를 풀었습니다
Find nearest prime number less than input number
Find nearest prime number less than input number. For example: if the input number is 125, then the nearest prime number whi...
3일 전
문제를 풀었습니다
Sophie Germain prime
In number theory, a prime number p is a *Sophie Germain prime* if 2p + 1 is also prime. For example, 23 is a Sophie Germain prim...
3일 전
문제를 풀었습니다
Circular Primes (based on Project Euler, problem 35)
The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime. The...
3일 전
문제를 풀었습니다
Mersenne Primes vs. All Primes
A Mersenne prime (M) is a prime number of the form M = 2^p - 1, where p is another prime number. <https://www.mathworks.com/matl...
3일 전
문제를 풀었습니다
The Goldbach Conjecture
The Goldbach conjecture asserts that every even integer greater than 2 can be expressed as the sum of two primes. Given the eve...
3일 전
문제를 풀었습니다
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 numb...
3일 전

