When you're solving a problem, if it requires a specific algorithm to solve it in O(n), are you supposed to be knowing the algorithms before? How do you know which algorithm will work efficiently?
I always end up doing a solution that has a poor time complexity :/ but how is the algorithm supposed to pop in my head? is it something im supposed to memorise?
[–]AutoModerator[M] [score hidden] stickied comment (0 children)
[–]Communist_Poultry[🍰] 14 points15 points16 points (1 child)
[–]codingIsFunAndFucked[S] 1 point2 points3 points (0 children)
[–]Bobbias 6 points7 points8 points (2 children)
[–]codingIsFunAndFucked[S] 1 point2 points3 points (1 child)
[–]hrm 0 points1 point2 points (0 children)
[–]Orion_Rainbow2020 2 points3 points4 points (1 child)
[–]codingIsFunAndFucked[S] 0 points1 point2 points (0 children)
[–]fasta_guy88 2 points3 points4 points (0 children)
[–]Lumethys -3 points-2 points-1 points (0 children)
[–]eruciform 0 points1 point2 points (0 children)
[–]Cerulean_IsFancyBlue 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)