Curiosity is the essence of human existence and every new question opens the door to innovation. But what goes behind the creation and solution of a problem is truly fascinating. It is an art. The art of asking questions, which is the source of all knowledge doesn’t come in handy. There is a lot of thinking and realizations involved. Being a hacker, you might have come across hundreds of problem statements in various online and live challenges. Today, we’ll take you to the depths of the riddler’s brain who has a multi-fold task of framing that one epic question and devising the apt solution for it.
The problem creation:
A problem statement is a concise description of the issues that need to be addressed by a problem-solving team and should be presented to them (or created by them) before they try to solve the problem.
A good programming problem always has the following elements:
- A clear and concise objective of the problem
- Input/Output generator
- Input verifier
- Sample solutions
- A good problem statement is concise, output oriented, specific and measurable
A problem statement starts by motivating the solver in some non-mathematical way. Creators make the aspects of the problem more memorable by employing tools of writing. For instance, making the solvers feel that they are not just maximizing the number of bends in a line of length N but swinging on a freaking Ninja rope can excite a problem-solver! Various test cases are employed to reflect the desired output. A riddler always makes sure that the problem is as engaging and reflective as possible. It should also be of an algorithmic nature with an ablity to open the doors of the mind. That is where the true magic happens!
The problem-solving aspect:
Einstein rightly said,” We cannot solve our problems with the same thinking that we created them.”
A general approach to solving any problem (programming/non-programming) is what I call the Adam’s Bridge Method. The other side of the bridge is the place you want to be (Final Outcome) and this side of the bridge where you’re currently standing (Current State). The space between the two is the abyss or the obstacles you need to overcome in order to reach the final outcome. List down the elements required to build the bridge, the locks and interlocks to make the bridge stable and exception handling for earthquakes. Drawing the analogy from this might help you in solving the problem and discovering other problems associated with it. A mind-map can serve as a blueprint for your bridge design. Once complete all you need to do is a test run for various conditions to test the durability and strength of the bridge(code in your case). When a green flag is given, you have your bridge to victory ready!
Interesting isn’t it? If you feel you have that flair for creating challenging coding problems and solutions, then Focuthon is the place for you! Come, create and solve with us!