How to solve Programming Problem

Hello friend I am here to help you for solving programming problem.So for today everyone of us learn multiple language like C , C++ , Python , Java and many More. So for knowledge purpose its good to know number of programming language but if you want to be good in problem solving skill , you have to be master in one or two language.
Because In problem solving skill 70% work is depend on Algorithm . Like how to solve this problem , is there any other way to solve this problem , can i optimized this solution ?
All of this question will came when you start doing or solving programming problem. So in that case you have to be select your best programming language. 
For example:
  You have a given array of number. find the smallest number from this array.
          2,7,9,5,3,1,7,8
So when you start solving this question you think different approach. So first i take a different approach where you see that how its way to choose selected language for selected question.
Solution :
              Language that you know : C, Python
    Lets write steps which i think for solving this question.
     Step 1 -> Sort the array.
     Step 2 -> Return that first (zero) index element.
  So this is final algorithm which i going to solve this question:
 First I select C : So we all know that if we write code for sorting in c its take time and its may be chances that you got some error or another problem which take your time.
   So its better to write entire sorting code in c . So we simply move our language selection from C to Python.
Select Python:
                 You simply call sort function of python and get our output in single line.
  So my main motivation for writing this blog is to select programming language wisely when we going to sit any challenge or any placement drive . If we select different language then its take too much time and may be we will not focus on another problem also.

So best of luck and keep practice and first time i write here so sorry for mistake.

Post a Comment

0 Comments