Hi everyone,

I started FreeCodeCamp about a month ago, and I’m having a great time. I have learned so much, especially doing the API projects (the random quote machine, twitch stream viewer, etc.).

I’m currently doing the intermediate algorithm challenges. While I haven’t had a CS algorithms class, I do know a bit about O(n) notation and algorithms from reading a good chunk of the Sedgewick algorithms book on my own. I’m a bit worried about the efficiency of my solutions.

For (e.g.) the sorted union challenge I need to remove duplicates in the final array. I definitely see a way to do it in O(n^2) time, but I’m pretty sure that if I utilize a tree set (as in Java) that keeps track of the unique values that it can be done in O(n log(n)) time, because it only takes O(log(n)) time to look up a value in a tree set.

Because Javascript doesn’t have a tree set built into the language, I think I’ll just take the easy way out for this problem just to keep up my pace. Still, I somehow feel like I’m going to get burned down the road when I interview for a web development job if I don’t have a solid grasp of algorithms, and I’m a bit worried that the challenges on FreeCodeCamp might not cut it given that optimal efficiency isn’t stressed. Does anyone have any advice on where I can learn or practice algorithms that would sufficiently prepare me?

Thanks.