Which among the following search algorithm requires least memory?निम्नलिखित खोज एल्गोरिदम में से किसके लिए कम से कम मेमोरी की आवश्यकता होती है?
निम्नलिखित खोज एल्गोरिदम में से किसके लिए कम से कम मेमोरी की आवश्यकता होती है?
Show answerHide answer
Correct answer: (C) DFSडीएफएस
Explanation
DFS keeps only the current path (plus unexplored siblings) on its stack, so it needs O(bd) memory. BFS must store the whole frontier level, which grows exponentially.DFS अपने स्टैक पर केवल मौजूदा पथ (और अनदेखे सहोदर) रखता है, इसलिए उसे O(bd) मेमोरी चाहिए। BFS को पूरा frontier स्तर रखना पड़ता है, जो चरघातांकी रूप से बढ़ता है।