Which among the following search algorithms requires least memory?निम्नलिखित खोज एल्गोरिदम में से किसके लिए कम से कम मेमोरी की आवश्यकता होती है?
निम्नलिखित खोज एल्गोरिदम में से किसके लिए कम से कम मेमोरी की आवश्यकता होती है?
Show answerHide answer
Correct answer: (C) DFSDFS
Explanation
DFS stores only the current path and its unexplored siblings, O(bm) memory, whereas BFS must keep a whole frontier, O(bᵈ).DFS केवल वर्तमान रास्ता और उसके अनदेखे भाई-नोड रखता है, यानी O(bm) मेमोरी, जबकि BFS को पूरी frontier रखनी पड़ती है, यानी O(bᵈ)।