MATLAB-Cody
MATLAB-Cody copied to clipboard
Solutions to problems for Cody Challenge :eyeglasses: :computer: :key:
Solutions to programming challenges on MATLAB Cody
Description:
This repository contains 94/94 solutions to Cody Challenge and 3/15 solutions to Onramp Practice practice problems with MATLAB language
- Problems are sorted from greater number of solvers to lower, representing increasing complexity.
- Solutions are correct and commented, but not the most efficient.
Inspiration:
Thanks to @marinskiy for HackerrankPractice
Useful links:
License:
MATLAB Cody Challenge contents
| Solvers ↓ | Likes | Order | Problem description |
|---|---|---|---|
| 33,022 | 112 | Problem 1 | Times 2 - START HERE :link: |
| 27,087 | 81 | Problem 2 | Make the vector [1 2 3 4 5 6 7 8 9 10] :link: |
| 23,225 | 51 | Problem 3 | Find the sum of all the numbers of the input vector :link: |
| 20,509 | 56 | Problem 8 | Add two numbers :link: |
| 16,120 | 81 | Problem 26 | Determine if input is odd :link: |
| 14,928 | 59 | Problem 6 | Select every other element of a vector :link: |
| 12,980 | 50 | Problem 5 | Triangle Numbers :link: |
| 10,965 | 36 | Problem 17 | Find all elements less than 0 or greater than 10 and replace them with NaN :link: |
| 10,038 | 142 | Problem 4 | Make a checkerboard matrix :link: |
| 9,098 | 31 | Problem 19 | Swap the first and last columns :link: |
| 8,527 | 44 | Problem 10 | Determine whether a vector is monotonically increasing :link: |
| 7,859 | 56 | Problem 12 | Fibonacci sequence :link: |
| 7,035 | 41 | Problem 33 | Create times-tables :link: |
| 6,488 | 42 | Problem 23 | Finding Perfect Squares :link: |
| 5,665 | 50 | Problem 25 | Remove any row in which a NaN appears :link: |
| 5,593 | 25 | Problem 14 | Find the numeric mean of the prime numbers in a matrix :link: |
| 5,324 | 47 | Problem 9 | Who Has the Most Change? :link: |
| 4,929 | 27 | Problem 32 | Most nonzero elements in row :link: |
| 4,886 | 49 | Problem 21 | Return the 3n+1 sequence for n :link: |
| 4,564 | 22 | Problem 20 | Summing digits :link: |
| 3,679 | 12 | Problem 22 | Remove the vowels :link: |
| 3,597 | 16 | Problem 30 | Sort a list of complex numbers based on far they are from the origin :link: |
| 3,213 | 60 | Problem 18 | Bullseye Matrix :link: |
| 3,158 | 14 | Problem 39 | Which values occur exactly three times? :link: |
| 3,120 | 46 | Problem 60 | The Goldbach Conjecture :link: |
| 2,923 | 16 | Problem 16 | Return the largest number that is adjacent to a zero :link: |
| 2,797 | 21 | Problem 94 | Target sorting :link: |
| 2,580 | 24 | Problem 29 | Nearest Numbers :link: |
| 2,392 | 13 | Problem 37 | Pascal's Triangle :link: |
| 2,358 | 7 | Problem 13 | Remove all the consonants :link: |
| 2,246 | 30 | Problem 15 | Find the longest sequence of 1's in a binary sequence :link: |
| 2,117 | 10 | Problem 41 | Cell joiner :link: |
| 1,909 | 6 | Problem 42 | Find the alphabetic word product :link: |
| 1,841 | 18 | Problem 27 | Pangrams! :link: |
| 1,813 | 17 | Problem 34 | Binary numbers :link: |
| 1,811 | 7 | Problem 28 | Counting Money :link: |
| 1,672 | 18 | Problem 46 | Which doors are open? :link: |
| 1,617 | 11 | Problem 73 | Replace NaNs with the number that appears to its left in the row. :link: |
| 1,533 | 11 | Problem 48 | Making change :link: |
| 1,500 | 16 | Problem 74 | Balanced number :link: |
| 1,462 | 5 | Problem 35 | Quote Doubler :link: |
| 1,442 | 8 | Problem 76 | De-dupe :link: |
| 1,329 | 10 | Problem 62 | Elapsed Time :link: |
| 1,248 | 9 | Problem 40 | Reverse Run-Length Encoder :link: |
| 1,160 | 10 | Problem 38 | Return a list sorted by number of occurrences :link: |
| 1,151 | 6 | Problem 72 | Interpolator :link: |
| 1,131 | 4 | Problem 51 | Find the two most distant points :link: |
| 1,113 | 4 | Problem 44 | Trimming Spaces :link: |
| 1,085 | 9 | Problem 45 | Make a Palindrome Number :link: |
| 1,050 | 10 | Problem 59 | Pattern matching :link: |
| 992 | 5 | Problem 57 | Summing Digits within Text :link: |
| 992 | 3 | Problem 87 | Indexed Probability Table :link: |
| 960 | 11 | Problem 31 | Remove all the words that end with "ain" :link: |
| 940 | 9 | Problem 49 | Sums with Excluded Digits :link: |
| 922 | 1 | Problem 47 | Extract leading non-zero digit :link: |
| 910 | 4 | Problem 50 | QWERTY coordinates :link: |
| 895 | 11 | Problem 64 | The Goldbach Conjecture, Part 2 :link: |
| 820 | 50 | Problem 24 | Function Iterator :link: |
| 805 | 3 | Problem 53 | Duplicates :link: |
| 767 | 5 | Problem 54 | Maximum running product for a string of numbers :link: |
| 717 | 8 | Problem 67 | Find common elements in matrix rows :link: |
| 703 | 6 | Problem 70 | Alphabetize by last name :link: |
| 700 | 10 | Problem 80 | Test for balanced parentheses :link: |
| 696 | 17 | Problem 43 | Subset Sum :link: |
| 692 | 9 | Problem 69 | Find the peak 3n+1 sequence value :link: |
| 678 | 7 | Problem 56 | Scrabble Scores :link: |
| 673 | 17 | Problem 68 | Kaprekar Steps :link: |
| 642 | 7 | Problem 71 | Read a column of numbers and interpolate missing data :link: |
| 624 | 7 | Problem 78 | Implement a ROT13 cipher :link: |
| 610 | 4 | Problem 36 | Find relatively common elements in matrix rows :link: |
| 597 | 7 | Problem 55 | Counting Sequence :link: |
| 583 | 1 | Problem 77 | Clean the List of Names :link: |
| 521 | 2 | Problem 66 | Find the two-word state names :link: |
| 513 | 5 | Problem 86 | Renaming a field in a structure array :link: |
| 512 | 10 | Problem 83 | Prime factor digits :link: |
| 509 | 5 | Problem 61 | Find state names that end with the letter A :link: |
| 508 | 13 | Problem 58 | Tic Tac Toe FTW :link: |
| 500 | 6 | Problem 89 | Counting in Finnish :link: |
| 485 | 1 | Problem 63 | Encode Roman Numerals :link: |
| 472 | 7 | Problem 88 | It dseon't mettar waht oedrr the lrettes in a wrod are :link: |
| 449 | 4 | Problem 82 | Remove the small words from a list of words :link: |
| 448 | 4 | Problem 75 | Find the palindrome :link: |
| 440 | 1 | Problem 92 | Find state names that start with the letter N :link: |
| 425 | 1 | Problem 85 | Remove the polynomials that have positive real elements of their roots :link: |
| 400 | 1 | Problem 91 | Get the area codes from a list of phone numbers :link: |
| 399 | 18 | Problem 52 | What is the next step in Conway's Life? :link: |
| 396 | 4 | Problem 81 | Mandelbrot Numbers :link: |
| 382 | 5 | Problem 65 | Word Counting and Indexing :link: |
| 381 | 3 | Problem 79 | DNA N-Gram Distribution :link: |
| 337 | 11 | Problem 96 | Knight's Tour Checker :link: |
| 322 | 6 | Problem 84 | Longest Divisor Run :link: |
| 317 | 12 | Problem 90 | Connect Four Win Checker :link: |
| 290 | 7 | Problem 93 | Calculate the Levenshtein distance between two strings :link: |
| 288 | 8 | Problem 95 | Given two strings, find the maximum overlap :link: |
MATLAB Onramp Practice contents
| Solvers ↓ | Likes | Order | Problem description |
|---|---|---|---|
| 8947 | 56 | Problem 44948 | Calculate a Damped Sinusoid :link: |
| 5797 | 48 | Problem 44960 | Rescale Scores :link: |
| 5252 | 193 | Problem 672 | Longest run of consecutive numbers :link: |