INDAPlus21 / INDAPlus21/eliasfl-sorting
Pass
- Dominant language
- CSS
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
**Well done Elias!**
_Elias. I'm stepping back from my _Komplettering_ comment below. I've come to realise that my assignment instructions are open for missinterpretation. Since you made a good job of completing parts of the assignment, you gain a Pass._
Good for you that I've written a lot of node applications in my days. Til next time however, please include instructions of how to build and run your application.
Don't misstake me. Your submission is great. But I miss an implementation of selection sort and merge sort. ~~Lets comprimise; I'll give you _Pass_ if you simply submit an implementation of selection sort and merge sort, without the necessary visualisation logic for them.~~
#### Notes
I notices that you do not make use of the full potential of the for-loop. It is purely personal preference of course. Some actually like the while-loop.
Don't mind me.
_Your code_:
```js
for (/*...*/) {
let j = i
while (j > 0 && data[j].value > data[j - 1].value) {
selectedIndex = j
update(data)
//...
j -= 1
selectedIndex = j
update(data)
//...
}
//...
}
```
_With for-loop_:
```js
for (/*...*/) {
for (let j = i; j > 0 && data[j].value > data[j - 1].value; j -= 1) {
selectedIndex = j
update(data)
//...
selectedIndex--;
update(data)
//...
}
//...
}
```
_Your code_:
```js
const flip = (k) => {
let left = 0
while (left < k) {
swap(left, k)
k--
left++
}
}
```
_With for-loop_:
```js
const flip = k => {
for (let left = 0; left < k; ) {
swap(left++, k--)
}
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
No file, test, or entry point is named. Start by locating the sorting implementation and the assignment instructions, then determine whether selection sort and merge sort are still required. The issue's contradictory grading comments do not define a clear completion condition.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100