Cody

Solution 2446995

Submitted on 1 Jun 2020
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
x = [5 1 4 2 8]; y_correct = 4; assert(isequal(bubblesort(x),y_correct))

count = 1 count = 2 count = 3 count = 4 count = 4

Output argument "c" (and maybe others) not assigned during call to "bubblesort". Error in Test1 (line 3) assert(isequal(bubblesort(x),y_correct))

2   Fail
x = [7 9 17 4 19 3 17 13 20 18]; y_correct = 14; assert(isequal(bubblesort(x),y_correct))

count = 1 count = 2 count = 3 count = 4 count = 5 count = 6 count = 7 count = 8 count = 9 count = 10 count = 11 count = 12 count = 13 count = 14 count = 14

Output argument "c" (and maybe others) not assigned during call to "bubblesort". Error in Test2 (line 3) assert(isequal(bubblesort(x),y_correct))

3   Fail
x = [73 72 27 56 16 12 21 12 19 1 9 52 44]; y_correct = 54; assert(isequal(bubblesort(x),y_correct))

count = 1 count = 2 count = 3 count = 4 count = 5 count = 6 count = 7 count = 8 count = 9 count = 10 count = 11 count = 12 count = 13 count = 14 count = 15 count = 16 count = 17 count = 18 count = 19 count = 20 count = 21 count = 22 count = 23 count = 24 count = 25 count = 26 count = 27 count = 28 count = 29 count = 30 count = 31 count = 32 count = 33 count = 34 count = 35 count = 36 count = 37 count = 38 count = 39 count = 40 count = 41 count = 42 count = 43 count = 44 count = 45 count = 46 count = 47 count = 48 count = 49 count = 50 count = 51 count = 52 count = 53 count = 54 count = 54

Output argument "c" (and maybe others) not assigned during call to "bubblesort". Error in Test3 (line 3) assert(isequal(bubblesort(x),y_correct))

4   Fail
x = [4 15 2 5 1 5 8 6 12 13 22 7]; y_correct = 18; assert(isequal(bubblesort(x),y_correct))

count = 1 count = 2 count = 3 count = 4 count = 5 count = 6 count = 7 count = 8 count = 9 count = 10 count = 11 count = 12 count = 13 count = 14 count = 15 count = 16 count = 17 count = 18 count = 18

Output argument "c" (and maybe others) not assigned during call to "bubblesort". Error in Test4 (line 3) assert(isequal(bubblesort(x),y_correct))

5   Fail
x = [48 15 16 86 89 29 56 2 59 57 2 6 27 53 91 29 52 32 4 61 67 18 99 12 37 76 71 85 91 9]; y_correct = 180; assert(isequal(bubblesort(x),y_correct))

count = 1 count = 2 count = 3 count = 4 count = 5 count = 6 count = 7 count = 8 count = 9 count = 10 count = 11 count = 12 count = 13 count = 14 count = 15 count = 16 count = 17 count = 18 count = 19 count = 20 count = 21 count = 22 count = 23 count = 24 count = 25 count = 26 count = 27 count = 28 count = 29 count = 30 count = 31 count = 32 count = 33 count = 34 count = 35 count = 36 count = 37 count = 38 count = 39 count = 40 count = 41 count = 42 count = 43 count = 44 count = 45 count = 46 count = 47 count = 48 count = 49 count = 50 count = 51 count = 52 count = 53 count = 54 count = 55 count = 56 count = 57 count = 58 count = 59 count = 60 count = 61 count = 62 count = 63 count = 64 count = 65 count = 66 count = 67 count = 68 count = 69 count = 70 count = 71 count = 72 count = 73 count = 74 count = 75 count = 76 count = 77 count = 78 count = 79 count = 80 count = 81 count = 82 count = 83 count = 84 count = 85 count = 86 count = 87 count = 88 count = 89 count = 90 count = 91 count = 92 count = 93 count = 94 count = 95 count = 96 count = 97 count = 98 count = 99 count = 100 count = 101 count = 102 count = 103 count = 104 count = 105 count = 106 count = 107 count = 108 count = 109 count = 110 count = 111 count = 112 count = 113 count = 114 count = 115 count = 116 count = 117 count = 118 count = 119 count = 120 count = 121 count = 122 count = 123 count = 124 count = 125 count = 126 count = 127 count = 128 count = 129 count = 130 count = 131 count = 132 count = 133 count = 134 count = 135 count = 136 count = 137 count = 138 count = 139 count = 140 count = 141 count = 142 count = 143 count = 144 count = 145 count = 146 count = 147 count = 148 count = 149 count = 150 count = 151 count = 152 count = 153 count = 154 count = 155 count = 156 count = 157 count = 158 count = 159 count = 160 count = 161 count = 162 count = 163 count = 164 count = 165 count = 166 count = 167 count = 168 count = 169 count = 170 count = 171 count = 172 count = 173 count = 174 count = 175 count = 176 count = 177 count = 178 count = 179 count = 180 count = 180

Output argument "c" (and maybe others) not assigned during call to "bubblesort". Error in Test5 (line 3) assert(isequal(bubblesort(x),y_correct))

Suggested Problems