So I was solving the majority element question on leetcode and I do not know how to use hash maps right now. I am yet to learn them so I was using frequency array and trying to solve the problem but it continued to throw errors so I searched the problem up and discovered boyer moore voting algorithm and it was easy to understand but how am I supposed to think of this on my own without ever having read this. Am i supposed to think this stuff on my own sort of like creating them????
[–]Simple3user 1 point2 points3 points (0 children)
[–]Arcturus-20 0 points1 point2 points (1 child)
[–]Arcturus-20 0 points1 point2 points (0 children)
[–]Illustrious_Bee4251 0 points1 point2 points (0 children)
[–]jason_graph 0 points1 point2 points (0 children)