|
|
|
|
|
by imtringued
945 days ago
|
|
>This is only hard if you have a hard time grasping loops, conditional comparisons or swaps Or because you don't know the algorithm in question... The problem isn't bubble sort but any generic algorithms test. The examiner wants you to write code but not tell you the specification because it would be shockingly similar to telling you the solution. When I read a post on HN about inverting a tree I was wondering how exactly you are supposed to invert the child and parent relationship so that children point to parents instead of parents pointing to children. I.e. leaf nodes are now at the root and the root node is where the leaf nodes are supposed to be. Then someone said "He meant reversing the tree" and I'm like "That is not what he said." |
|
I don't think anyone would care if you did an insertion sort or some other brute force way to sort. Brute force sorting in general is trivial to come up with.