Should one practice a difficult question and spend sufficient time on that or practice more number of problems in a short span of time? What would you do?
As from my Experience, solving more number of easy problems for 3/4th time of your goal and then try difficult problems. When you solve easy ones you will understand the patterns and your brain get used to solve and find algorithms to solve difficult one's easily. Hope it helps your competitive programming
Give me six hours to chop down a tree and I will spend the first four sharpening the axe (Abraham Lincoln)
I'd say if your goal is competition, then the best thing you can do is find people to compete against. You and them would bounce ideas and information off each other and progress towards that goal faster than trying to imagine what competition feels like with regards to programming.
Check out meetup.com and see if there are any local meetup groups that share your goals or more generally just revolve around programming.
Outside of that, check out Code Kata for problems and combine those with the Pomodoro Technique if your goal is speed.
When practicing I like to set up a Practice folder and create a subdirectory for each day I Practice. You can even create sub-subdirectories for the pomodoro periods with which you work on a problem. After the day or period is up, that directory is frozen and you should only go back to it for review or reference. Basically start fresh on a problem each day or period.
Depends what you measure ! There are different things that are important for different parts.
speed ? ha ? what is the bottlenet ? what is the target ? what is the metric used ? I'm a slow coder who thinks a lot about his problems so I will always go for quality and efficiency of the functional component.
a company on the other hand will want output so the amount of code written in a certain way will be more important to them.
just pick what you wanna accomplish and choose some metrics like
"memory consumption per iteration", "time complexity" but only for tasks where it matters ;D no one cares if a react component used 22mb of memory :) but if a file read lib used 22mb without reading a file .... this would be weird :)
Siddarthan Sarumathi Pandian
Full Stack Dev at Agentdesks | Ex Hashnode | Ex Shippable | Ex Altair Engineering
Competitive programming is like a sport and cannot be mastered in the short run. I have been trying to get a grip on it for the last six or seven years and I finally think I have come up with a plan.
Prof Steven Skinea's lecture series on competitive programming (it's an actual course at a university https://www.youtube.com/watch?v=3dkbFf82_b8 ) is the answer I've come up with. Might also be a good idea to grab a copy of his algorithm design manual to go with the course.
You need to spend at least a year solving problems to get yourself acquainted with the various problem patterns. Even if you solve one problem per day for the next 365 days, I assure you that you'll be well on your path to becoming a competitive programmer.