Nick1982
On this page, you find all documents, package deals, and flashcards offered by seller nick1982.
- 32
- 0
- 4
Community
- Followers
- Following
37 items
Matlab Cody Problem 247. Arrange Vector in descending order
Problem 18. Bullseye Matrix
Created by Cody Team in Cody Challenge 
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n 1)/2 around the center point. Examples:
 Input n = 3
 Output a is [ 2 2 2 
 2 1 2
 2 2 2 ]
 Input n = 5
 Output a is [ 3 3 3 3 3
 3 2 2 2 3 
 3 2 1 2 3
 3 2 2 2 3 
 3 3 3 3 3 ]

- Package deal
- Answers
- • 2 pages •
Problem 18. Bullseye Matrix
Created by Cody Team in Cody Challenge 
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n 1)/2 around the center point. Examples:
 Input n = 3
 Output a is [ 2 2 2 
 2 1 2
 2 2 2 ]
 Input n = 5
 Output a is [ 3 3 3 3 3
 3 2 2 2 3 
 3 2 1 2 3
 3 2 2 2 3 
 3 3 3 3 3 ]

Matlab Cody Problem 35. Quote Doubler
Problem 35. Quote Doubler
Created by Cody Team in Cody Challenge 
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote character.
If there are n such occurrences in s1, then s2 will be n characters longer than s1.

- Package deal
- Answers
- • 2 pages •
Problem 35. Quote Doubler
Created by Cody Team in Cody Challenge 
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote character.
If there are n such occurrences in s1, then s2 will be n characters longer than s1.

Matlab Cody Problem 62. Elapsed Time
Problem 62. Elapsed Time
Created by Cody Team in Cody Challenge 
Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, in decimal hours, separates them. Assume d2 is always later than d1.
Example:
 Input d1 = '2010/12/14 12:00:00'
 Input d2 = '2010/12/14 13:06:36'
 Output elapsed is 1.11

- Package deal
- Answers
- • 2 pages •
Problem 62. Elapsed Time
Created by Cody Team in Cody Challenge 
Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, in decimal hours, separates them. Assume d2 is always later than d1.
Example:
 Input d1 = '2010/12/14 12:00:00'
 Input d2 = '2010/12/14 13:06:36'
 Output elapsed is 1.11

5 Matlab Cody Problems Vol 4
Problems 15 , 76 , 48 , 74 and 147 with full functional code . Just copy and paste to the provided links and complete the problems mentioned above!
- Package deal
- • 5 items •
Problems 15 , 76 , 48 , 74 and 147 with full functional code . Just copy and paste to the provided links and complete the problems mentioned above!
Matlab Cody Problem 15. Find the longest sequence of 1's in a binary sequence
Problem 15. Find the longest sequence of 1's in a binary sequence.
Created by Cody Team in Cody Challenge 
Given a string such as
 s = '011110010000000100010111'
find the length of the longest string of consecutive 1's. In this example, the answer would be 4.
Example:
 Input x = '110100111'
 Output y is 3

- Package deal
- Answers
- • 2 pages •
Problem 15. Find the longest sequence of 1's in a binary sequence.
Created by Cody Team in Cody Challenge 
Given a string such as
 s = '011110010000000100010111'
find the length of the longest string of consecutive 1's. In this example, the answer would be 4.
Example:
 Input x = '110100111'
 Output y is 3

Matlab Cody Problem 76. De-dupe
Problem 76. De-dupe
Created by Cody Team in Cody Challenge 
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if
 a = [5 3 6 4 7 7 3 5 9]
then
 dedupe(a) = [5 3 6 4 7 9]

- Package deal
- Answers
- • 2 pages •
Problem 76. De-dupe
Created by Cody Team in Cody Challenge 
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if
 a = [5 3 6 4 7 7 3 5 9]
then
 dedupe(a) = [5 3 6 4 7 9]

Matlab Cody Problem 48. Making change
Problem 48. Making change
Created by Cody Team in Cody Challenge 
Given an amount of currency, return a vector of this form:
 [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01]
Example:
 Input a = 257.68
 Output b is [2 1 0 0 1 1 0 1 0 1 1 3]
Always use bigger bills/coins if possible.

- Package deal
- Answers
- • 2 pages •
Problem 48. Making change
Created by Cody Team in Cody Challenge 
Given an amount of currency, return a vector of this form:
 [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01]
Example:
 Input a = 257.68
 Output b is [2 1 0 0 1 1 0 1 0 1 1 3]
Always use bigger bills/coins if possible.

Matlab Cody Problem 74. Balanced number
Problem 74. Balanced number
Created by Cody Team in Cody Challenge 
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to the second half.
Examples:
 Input n = 13722 
 Output tf is true
because 1 3 = 2 2.
 Input n = 23567414 
 Output tf = true
All palindrome numbers are balanced.
This is partly from Project Euler, Problem 217.

- Package deal
- Answers
- • 2 pages •
Problem 74. Balanced number
Created by Cody Team in Cody Challenge 
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to the second half.
Examples:
 Input n = 13722 
 Output tf is true
because 1 3 = 2 2.
 Input n = 23567414 
 Output tf = true
All palindrome numbers are balanced.
This is partly from Project Euler, Problem 217.

Matlab Cody Problem 147. Too mean-spirited
Problem 147. Too mean-spirited
Created by the cyclist in Community 
Find the mean of each consecutive pair of numbers in the input row vector. For example,
x=[1 2 3] ----> y = [1.5 2.5]
x=[100 0 0 0 100] ----> y = [50 0 0 50]

- Package deal
- Answers
- • 2 pages •
Problem 147. Too mean-spirited
Created by the cyclist in Community 
Find the mean of each consecutive pair of numbers in the input row vector. For example,
x=[1 2 3] ----> y = [1.5 2.5]
x=[100 0 0 0 100] ----> y = [50 0 0 50]

5 Matlab Cody Problems Vol 3
Problems 41 , 46 , 262 , 27 and 174 with full functional code . Just copy and paste to the provided links and complete the problems mentioned above!
- Package deal
- • 5 items •
- Matlab Cody Problem 27. Pangrams! • Answers
- Matlab Cody Problem 262. Swap the input arguments • Answers
- Matlab Cody Problem 46. Which doors are open • Answers
- Matlab Cody Problem 41. Cell joiner • Answers
- Matlab Cody Problem 174. Roll the Dice • Answers
Problems 41 , 46 , 262 , 27 and 174 with full functional code . Just copy and paste to the provided links and complete the problems mentioned above!