Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Can someone explain me data mapping in ones head as for programming? Never heard of it.
-
Ederbit7265yI know exactly what you mean. But from my experience, being able to solve these issues boils down experience. They most likely had to fix similar issues in the past.
-
@CaptainRant The obvious approach to avoid O(n^2) would be to sort the second list in O(n log n). Then loop through the first list, and for each element, check whether it exists in the second list using binary search. That step also has O(n log n).
Just been doing that in a project. -
@chagai95 Sometimes debugging doesn't provide clarification and forgetting is human. It wasn't about the if but about the data that was being input.
Related Rants
As a junior developer it's frustrating to not have the skill yet of mentally mapping data models in your head, so that you can figure out bugs.
I see senior developers being able to quickly solve bugs because they can translate code into data models and they can figure out what's wrong.
Me on the other hand, I spend hours and days with my hands in my hair trying to figure out why my algorithm isn't giving me back what I expect it to.
It'll take experience.. I only have 1 year experience..
rant
experience
coding
frustration
insight