What is the time complexity of searching in a Hash Table?
ہیش ٹیبل میں تلاش کرنے کی وقت کی پیچیدگی کیا ہے؟
- O(1)
- O(N)
- O(log N)
- None of these
Explanation
On average, searching in a well-implemented hash table has a time complexity of O(1) (constant time) due to direct indexing using the hash function.
In the worst-case scenario, if many elements hash to the same index (collisions), the time complexity can degrade to O(n) (linear time).
Related MCQs
آٹوکیڈ میں کون سا کمانڈ کناروں کو گول کرنے کے لیے استعمال ہوتا ہے؟
- Trim
- Fillet
- Offset
- Extend
اس سوال کو وضاحت کے ساتھ پڑھیں
سڑک کی جیومیٹری کی ڈیزائننگ کے لیے عام طور پر کون سا سافٹ ویئر استعمال کیا جاتا ہے؟
- AutoCAD Civil 3D
- MS Excel
- MS Word
- Adobe Photoshop
اس سوال کو وضاحت کے ساتھ پڑھیں
- Format
- Modify
- Draw
- Tools
اس سوال کو وضاحت کے ساتھ پڑھیں
- Trim
- Offset
- Extrude
- Fillet
اس سوال کو وضاحت کے ساتھ پڑھیں
بڑی اسکرین پر ویڈیو تصاویر دکھانے کے لیے کون سا آؤٹ پٹ ڈیوائس استعمال ہوتا ہے؟
- Scanner
- Printer
- Projector
- None of these