Gelöst


Return longest string in 1-D array of strings
Find the longest string in an array of strings. Return an empty string if the initial array is empty. If there are multiple stri...

3 Monate vor

Gelöst


determine the sum of decimal part for given matrix
determine the sum of fraction part for the given matrix

3 Monate vor

Gelöst


Length of shortest path in a directed graph.
Given a directed graph and a start and end node in the graph, return the minimum number of hops required to reach the end node f...

3 Monate vor

Gelöst


Total Volume Goal ( Medium )
Usually, the target T must be in one jug. In this version, the target T is the sum of water in all N jugs. Example: C = [3,5], ...

3 Monate vor

Gelöst


Robust Huffman Decoding: The Single-Bit Error Challenge
In the world of data compression, Huffman coding is a classic algorithm. However, it is notoriously fragile: a single bit error ...

3 Monate vor

Gelöst


Find all prime factors of the input
Given an input x, find its all prime factors. Return the vector with all factors in ascending order. Efficiency is the key here...

4 Monate vor

Gelöst


Number Puzzle - 104

4 Monate vor

Gelöst


Do you have the minimum age?

4 Monate vor

Gelöst


Palindrome numbers
Find the palindrome numbers (two or more digits) from 1 to n where n is the number passed to the function.

4 Monate vor

Gelöst


Apply the planing transform to natural numbers
Claude Lenormand’s planing (or raboter, in French) transform removes one element from each run in a sequence; that is, imagine a...

4 Monate vor

Gelöst


Calculating Swimming Stroke Index (SI)
In competitive swimming, speed () is only one part of the equation. High efficiency is defined by moving fast while maintaining ...

4 Monate vor

Gelöst


Two Jugs: Minimum Steps ( Medium )
Following the first problem, now you need to find the shortest path. Given two jugs with capacities A and B, find the minimum nu...

4 Monate vor

Gelöst


Use of regexp
Given a string, containing several sentences, such as: 'I played piano. John played football. Anita went home. Are you safe?...

4 Monate vor

Gelöst


Convert a structure into a string
Convert the contents of each fields into a string. Example with an input structure s with 2 fields : s.age = '33' s....

4 Monate vor

Gelöst


Convert String to Morse Code
Convert a given string to international <http://en.wikipedia.org/wiki/Morse_code Morse Code> * Strings will only have [A-z], ...

4 Monate vor

Gelöst


Space Saver
Remove all characters that are below a space in ASCII value.

4 Monate vor

Gelöst


Reverse the Words (not letters) of a String
*Description* Change the words of a string such that the words appear in reverse order. You may assume that the string is a n...

4 Monate vor

Gelöst


letter yes yes & letter no no
Split a string into two strings, wherein the first string has all alphabetic letters and the second string has all the remaining...

4 Monate vor

Gelöst


String substitution, sub problem to cryptoMath
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

4 Monate vor

Gelöst


Calculate the Hamming distance between two strings
Inspired by a similar Cody problem found <http://www.mathworks.com/matlabcentral/cody/problems/93-calculate-the-levenshtein-dist...

4 Monate vor

Gelöst


Golomb's self-describing sequence (based on Euler 341)
The Golomb's self-describing sequence {G(n)} is the only nondecreasing sequence of natural numbers such that n appears exactly G...

4 Monate vor

Gelöst


Day counter function
Write a function called day_counter that returns the number of Mondays that fell on the first day of the month in a given year b...

4 Monate vor

Gelöst


Odd elimination
Inspired by Project Euler problem #539 You'll be given a vector from 1 to n; Going from left to right, remove the first n...

4 Monate vor

Gelöst


Pandigital Factors (Based on Euler 491)
A Pandigital Number is a number containing all of the digits from 0-9 inclusive, with the added stipulation that it does not hav...

4 Monate vor

Gelöst


Extra safe primes
Did you know that the number 5 is the first safe prime? A safe prime is a prime number that can be expressed as 2p+1, where p is...

4 Monate vor

Gelöst


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

4 Monate vor

Gelöst


Pernicious Anniversary Problem
Since Cody is 5 years old, it's pernicious. A <http://rosettacode.org/wiki/Pernicious_numbers Pernicious number> is an integer w...

4 Monate vor

Gelöst


Twins in a Window
<http://en.wikipedia.org/wiki/Twin_primes Twin primes> are prime numbers that differ by 2, such as [11,13] or [41,43]. Write a f...

4 Monate vor

Gelöst


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

4 Monate vor

Mehr laden