Gelöst


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

fast 3 Jahre vor

Gelöst


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

fast 3 Jahre vor

Gelöst


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

fast 3 Jahre vor

Gelöst


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

fast 3 Jahre vor

Gelöst


Coin Distribution - 02
Prev prob <https://www.mathworks.com/matlabcentral/cody/problems/45385-coin-distribution> Given a set of coins and an amount,...

fast 3 Jahre vor

Gelöst


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

fast 3 Jahre vor

Gelöst


Whole Number Concatenator
Write a function that concatenates whole numbers. For example: numcat(111,222) should return 111222 numcat(1,2,3,4,5) s...

fast 3 Jahre vor

Gelöst


The number of trailing zero digit of a factorial
For given positive integer n, take factorial of that number. How many trailing zeros does it have? Example: factorial(11) = 3...

fast 3 Jahre vor

Gelöst


Lunar Arithmetic (Multiplication)
<https://oeis.org/A087061 OEIS link for a description of lunar arithmetic> Simply take the larger digit when adding and take ...

fast 3 Jahre vor

Gelöst


Lunar Arithmetic (Addition)
<https://oeis.org/A087061 OEIS link for a description of lunar arithmetic> Simply take the larger digit. Example 1: ...

fast 3 Jahre vor

Gelöst


Muphry's Law of MATLAB
You're running some simple multiplication problems through MATLAB for error checking purposes, but nothing seems to come up with...

fast 3 Jahre vor

Gelöst


Expand 10^n to Powers of 4
Given an integer n, return the coefficients c = [c_n,c_n-1,...,c_0] Such that 10^n = c_n*4^(n) + c_n-1*4^(n-1...

fast 3 Jahre vor

Gelöst


Numbers on 7-segment
This is a 7-segment: _ |_| |_| It's a 3-by-3 char matrix.It has made by 3 characters: '_' , '|' and ' ' (space...

fast 3 Jahre vor

Gelöst


Still more miles to go before I sleep
It's time for more odometer fun. Last problem, my car's odometer hit 56789. It's coming up on 111111 now, which (barring a maj...

fast 3 Jahre vor

Gelöst


Smallest n, for n! to have m trailing zero digits
For given positive integer n, its factorial often has many trailing zeros, in other words many factors of 10s. In order for n! t...

fast 3 Jahre vor

Gelöst


Pattern Sum
Write a function which receives two single digit positive integers, (k and m) as parameters and calculates the total sum as: k...

fast 3 Jahre vor

Gelöst


Check if a rotated array was originally sorted
Suppose a sorted array is rotated at some pivot unknown to you. For example, |[0 1 2 4 5 6 7]| might become |[5 6 7 0 1 2 4]|. ...

fast 3 Jahre vor

Gelöst


Find longest run
Write a function longest_run that takes as input an array of 0's and 1's and outputs the length and index of the longest consecu...

fast 3 Jahre vor

Gelöst


Look Up Mapping
Let the input is A = {[] [] [] [1] []}; B = {'A','B','C','D','E'}; Mapped Output = 'D';

fast 3 Jahre vor

Gelöst


Assignment Problem
Given a matrix where row i corresponds to person i, and column j corresponds to task j and cell (i,j) corresponds to the time ta...

fast 3 Jahre vor

Gelöst


Sorting integers by their digits (Level 4)
This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42815-sorting-integers-by-their-digits-level...

fast 3 Jahre vor

Gelöst


Sorting integers by their digits (Level 3)
This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42811-sorting-integers-by-their-digits-level...

fast 3 Jahre vor

Gelöst


Sorting integers by their digits (Level 2)
This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42809-sorting-integers-by-their-digits Probl...

fast 3 Jahre vor

Gelöst


Sorting integers by their digits (Level 1)
Given a vector, v, of positive integers, return a vector, w, by sorting v in ascending order, such that primary sorting is done ...

fast 3 Jahre vor

Gelöst


Find last non-zero in a given dimension
You are given a logical matrix *BW* _of any dimension_, and a dimension *dim*. You need to find the locations of the last non-ze...

fast 3 Jahre vor

Gelöst


Fill an array given a sum and array length values
Fill an array with random numbers so that their sum and array length will be equal to the given values as input. Function will ...

fast 3 Jahre vor

Gelöst


Binary Inversion
Given the unsigned 8-bit integer x, return the number y which is the binary inversion of x. For example if x is 5, y should b...

fast 3 Jahre vor

Gelöst


Convert float to base N
The matlab function dec2base converts a positive integer number to a specified base. Extend it so that it works with non intege...

fast 3 Jahre vor

Gelöst


Integer complexity (Large numbers)
Inspired by <http://www.mathworks.com/matlabcentral/cody/problems/42831-integer-complexity Problem 42831>, this problem aims to ...

fast 3 Jahre vor

Gelöst


Integer complexity
Given an array, n, of positive integers, return an array, c, of the same size, in which each element is the complexity of the co...

fast 3 Jahre vor

Mehr laden