1. Make sure you understand the problemAs something to begin with, it is always good to make sure you really understand the problem. One way to check if you understand it or not is to try to explain it in simple terms, either verbally or in writing. If you fail to explain the problem, it means you don't understand it completely. Practising this will help you to see the flaws in your understanding and fix them.
2. Break down the problem into smaller onesUpon making sure you understand the problem, it would be good to break it down into a number of smaller problems that are easier to solve. If this method of approaching problems of all kinds is strange to you, perhaps it would be a good idea to get familiar with computational thinking, which is a set of problem-solving methods.
3. Plan the solution firstAnother good idea would be to develop a solution plan first, instead of attacking the problem right away. You should give yourself time to analyze the problem and process the data. Then try to plan a solution by writing down its steps.
4. Solve programming problems on various preparation platformsPracticing on various preparation platforms for programmers and programming interviews also will be really helpful in improving your problem-solving skills. Especially if you will use a number of platforms to diversify the problems you are working on as much as possible. Here are a few platforms that you can use:
One of the most popular tech interview platforms with a huge community and over 1650 problems for you to practice. Supports 14 programming languages including Java.
Another well-known website with all kinds of content for programmers, including programming tasks, articles, tips and lots of interview questions.
Besides programming problems, this platform allows you to test yourself in mock interviews, as well as to participate in coding competitions and hackathons.
5. Use CodeGym to practice and learn how to approach programming problemsCodeGym course, with its practice-first approach and over 1200 tasks of different kinds and varying difficulty, also would be a great tool both to train in solving practical problems and learn the basics of dealing with them.
6. Play coding games to practice problem-solving while having funPlaying popular coding games would be another great way to train your brain to solve programming problems in a fun and exciting environment. This is one of the main reasons CodeGym has so many gamification elements in it. Some other popular coding games that we would recommend include Robocode, Codewars, CodeMonkey, and Elevator Saga.
7. Extend your knowledge of design patterns, algorithms and data structuresIf your problem-solving skills are not very impressive and you often get stuck trying to solve a problem, maybe it would be a good idea to strengthen your theory foundation by diving into some programming-related subjects such as math, data structures, and algorithms. Learning about design patterns would be especially helpful as it allows you to memorize the templates often used to approach certain problems.
8. Get feedbackFinally, getting feedback from real people about your solutions is important. Feedback is one of the most critical factors in your growth as a professional developer in general, as it allows you to identify and fix flaws in your skills and thinking patterns. By the way, feedback and interaction, as a way to boost your progress, is also the reason CodeGym has so many social features and encourages students to use them.
Expert adviceTo wrap it up, here are some additional recommendations on dealing with programming problems from experienced developers and coders. “Talk to people — find someone who can solve some of those harder ones and see if you understand the solution, and — better yet — understand how you might have come up with that solution in the first place. If it uses <clever algorithm> that you've never seen before, you need to spend time learning clever algorithms. If it's using ingredients you know in unexpected ways, observe how the problem was translated from its original form to the form that yields to those known ingredients, and repeat. After a few of those rounds you should feel more comfortable approaching hard problems,” recommends Alon Amit, an experienced programmer and Vice President at Intuit. “You should be solving problems you don’t think you can solve, but don’t be too confident and don’t try solving the hardest problems. You should look for problems by algorithms or tags. When you learn some algorithm, search for some problems that need it and solve them using the algorithm you just learned,” suggests Martin Kocijan, another coding veteran. But don’t overdo it, spending too much time and energy on solving programming problems may be not very good, warns Jacek Podkanski, a programmer with many years of coding experience from England: “Don’t try to fight it. I made the mistake of solving lots of puzzles on Hackerrank. I only stopped when people started to warn me that if I continued I would seriously damage my employability. Stop before it is too late.”
|What else to read:|