so this might be a weird question, and it might be better to ask a psychologist but i thought since they probably wouldn't know much about programming, i could ask you guys. So i have an assignment and it asks me to solve a problem using an algorithm. So i finish the problem and then usually look online for better algorithms and see how people did theirs. But i was working on a problem that i had solved to about maybe 50%, but then i ran into a wall.
So i looked online and found this great algorithm, i want to use it (i have already implemented it) but i feel a bit jealous and guilty that i couldn't think of a way to solve it and like i have done something wrong. I will obviously cite where i got the algorithm from, so i'm not cheating. How should i view something like this, try to what i learned from the algorithm and try to apply it in the future? Do you guys ever feel like oh i copied it and i was unable to think about it on my own. I have like an ocd about this stuff. Thanks for any help and support