Hi guys, firstly maybe it's by default understandable to others so please I know "it's simple" but I need to be freshly and not confused about what I'm going to ask.
What's confusing me is, when I've a specific Problem, and I need to solve the problem by solving its sub-problems(recursive manner), I'm wondering why we disregarding the solved part problem once solved ? meaning if I have a Problem which its to sort an Array by using for instance QuickSort, lets say I have {1,2,3,4,5,6} and the pivot is 6 which we say that 6 is on its exact place so its sorted, then we are having now sub-problem to solve which is {1,2,3,4,5} ..and then the same thing, 5 is the pivot, and its on the same exact place, so we just ignoring it and saying now we have subproblem which is {1,2,3,4} ..etc , my question why we are neglecting the sorted element and once its sorted we subtract it from the problem? it's like a nullity for us after sorted why?! maybe I'm not good as much good at logic but I believe by your help I could understand it very well.
Maybe if you give me please a real life analogues elaborating that logic(neglecting some parts of the problem and going just to the subproblems) would be much appreciated to get fast learning
What's confusing me is, when I've a specific Problem, and I need to solve the problem by solving its sub-problems(recursive manner), I'm wondering why we disregarding the solved part problem once solved ? meaning if I have a Problem which its to sort an Array by using for instance QuickSort, lets say I have {1,2,3,4,5,6} and the pivot is 6 which we say that 6 is on its exact place so its sorted, then we are having now sub-problem to solve which is {1,2,3,4,5} ..and then the same thing, 5 is the pivot, and its on the same exact place, so we just ignoring it and saying now we have subproblem which is {1,2,3,4} ..etc , my question why we are neglecting the sorted element and once its sorted we subtract it from the problem? it's like a nullity for us after sorted why?! maybe I'm not good as much good at logic but I believe by your help I could understand it very well.
Maybe if you give me please a real life analogues elaborating that logic(neglecting some parts of the problem and going just to the subproblems) would be much appreciated to get fast learning