Step 1: The first and foremost thing you should follow is how to divide the problem into small parts. In this step Keep in mind these three aspects : a. What's the requirement of the Problem. b. What Input does it takes c. What output does it require_ But Along with that, You should keep in mind What constraints does it hold which would be helping you in getting your way easier
Step 2: After knowing the requirement of the same Hold the pen and paper. Try to solve the problem using Pen and Paper If stuck somewhere try to search for that part, It would be helping you in gaining the knowledge as well as helping you in getting to know your mistake Done with Step 2? Let us Move to Next
Step 3: After solving the problem using pen and paper. Try to think How you divide your problem into a Small Small Method which would let your program become a Good one or Your code would be Good Code.
Note: Do remember to keep the white spaces Between operators. The Readability Of your code would be incremented by +1. Along with that try to give your functions a good name ("If you forgot to add good names It would be like you Forgot to add Chocolate in Your Chocolate cake :))")
Step 4: Hurray !! We are done with the functionality Part Also The Last thing Write your code.
Note: If your code is working correctly Go to Optimization Part else first correct it then proceeds
And Finally, we are done with writing a Solution of Problem which initially we weren't able to think Of...