Gelöst


Generate a string like abbcccddddeeeee
This is the string version of Problem 1035. <http://www.mathworks.com/matlabcentral/cody/problems/1035-generate-a-vector-like-1-...

etwa ein Monat vor

Gelöst


Check transmitted data follow even parity (True or false)
Check transmitted data follow even parity (True or false) <http://en.wikipedia.org/wiki/Parity_bit/ Parity Bit> Say, '010...

etwa ein Monat vor

Gelöst


Find two numbers that add up to the target value
Given a vector A and target n, return the indices of two numbers that add up to n. If there are multiple solutions, return the f...

etwa ein Monat vor

Gelöst


Draw 'W'
For any given n, return a matrix of height n and width 4n-3 containing a W of ones. Example: n=2 ans= [1 0 1 0 1 0 1 0 1 0...

etwa ein Monat vor

Gelöst


Circular Segment Area
Let us consider a circle with radius . If we draw an angle (in radians) from the center of the circle, the two radii forming th...

etwa ein Monat vor

Gelöst


Mongean Shuffle
A Mongean shuffle of an n card deck starts with putting the initial deck on the left hand side. * The top card of the deck is...

etwa ein Monat vor

Gelöst


Bessel Polynomials
Return the n-th Bessel polynomial Assume that n is a non-negative finite integer. bessel_poly(0) ans = 1 bessel_poly(1) ...

etwa ein Monat vor

Gelöst


Babylonian method
Calculate the square root of a given positive number a using the Babylonian method (https://en.wikipedia.org/wiki/Methods_of_co...

etwa ein Monat vor

Gelöst


Radius of an inner N-dimensional sphere
A hypercube is an N-dimensional analogue of a square (N=2). Similarly, an N-sphere is an N-dimensional analogue of a circle. Not...

etwa ein Monat vor

Gelöst


Convert binary numbers array into array of decimal numbers.
Convert binary numbers array into array of decimal numbers. Example x=[ 11001000 ; 11001001 ; 11001010 ; 11001011 ; 11001100 ;...

etwa ein Monat vor

Gelöst


Find the repeating elements and repetitions of a row vector.
So let's say that x is a vector, for example, x = [4, 4, 5, 5, 5, 6, 7, 7,8, 8, 8, 8] Now we want to get the following two ve...

etwa ein Monat vor

Gelöst


Matrix indexing with two vectors of indices (★★)
(copy of Prob 589) Given a matrix M and two index vectors a and b, return a row vector x where x(i) = M(a(i),b(i)). Thus, if...

etwa ein Monat vor

Gelöst


Mesh the square with triangles
Problem statement An square is a regular polygon with 4 vertices and 4 edges. A triangulated mesh T (stands for triangles he...

etwa ein Monat vor

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

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


Square Patterns in a square matrix

etwa ein Monat 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...

etwa ein Monat 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], ...

etwa ein Monat 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 ...

etwa ein Monat 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...

etwa ein Monat vor

Gelöst


Number Puzzle - 104

etwa ein Monat vor

Gelöst


Do you have the minimum age?

etwa ein Monat 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.

etwa ein Monat 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...

etwa ein Monat 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 ...

etwa ein Monat 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...

etwa ein Monat 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?...

etwa ein Monat 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....

etwa ein Monat 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], ...

etwa ein Monat vor

Mehr laden