Which graph representation is more memory-efficient for sparse graphs?विरल रेखांकन के लिए कौन सा ग्राफ प्रतिनिधित्व अधिक मेमोरी-कुशल है?
विरल रेखांकन के लिए कौन सा ग्राफ प्रतिनिधित्व अधिक मेमोरी-कुशल है?
Show answerHide answer
Correct answer: (B) Adjacency listआसन्न सूची
Explanation
An adjacency list stores only the edges that exist, using O(V + E) space. An adjacency matrix always uses O(V²) space, which is wasteful when a sparse graph has few edges.Adjacency list केवल मौजूद किनारे संग्रहीत करती है और O(V + E) स्थान लेती है। Adjacency matrix हमेशा O(V²) स्थान लेती है, जो तब बर्बादी है जब विरल (sparse) ग्राफ में कम किनारे हों।