পাষাণ আমাদের কী শিক্ষা দেয়?

Updated: 1 year ago
  • ক
    আপন কাজে উদার হতে
  • খ
    আপন কাজে ফাঁকিবাজ হতে
  • গ
    আপন কাজে পরিশ্রমী হতে
  • ঘ
    আপন কাজে কঠোর হতে
125
ব্যাখ্যাঃ

Question:

What is the time complexity of searching for an element in a balanced Binary Search Tree (BST) containing n nodes in the worst case?

Options:

        
  • A) O(1)
  •     
  • B) O(log n)
  •     
  • C) O(n)
  •     
  • D) O(n log n)

Correct Answer: B) O(log n)

Explanation:

A Binary Search Tree (BST) maintains the property that for any given node, all values in its left subtree are smaller, and all values in its right subtree are larger.

        
  • Why B is correct: In a balanced BST (such as an AVL tree or Red-Black tree), the height of the tree is strictly bounded by O(log n). Because each comparison allows the algorithm to discard half of the remaining nodes, the search path from the root to any leaf takes at most O(log n) steps in the worst case.
  •     
  • Why A is incorrect: Constant time O(1) lookup is characteristic of ideal hash tables, not tree-based structures where traversal is required.
  •     
  • Why C is incorrect: A time complexity of O(n) occurs in an unbalanced (skewed) BST where the tree degrades into a linked list. However, the problem explicitly specifies that the tree is balanced.
  •     
  • Why D is incorrect: O(n log n) is typically the time complexity for sorting algorithms (such as Merge Sort or Heap Sort), not single-element lookup.
Satt AI
Satt AI
2 weeks ago

Related Question

View All
Updated: 1 year ago
  • ক
    ১৯০১
  • খ
    ১৯০২
  • গ
    ১৯০৩
  • ঘ
    ১৯০৪
204
Updated: 1 year ago
  • ক
    পবন
  • খ
    দিবাকর
  • গ
    গগন
  • ঘ
    ধরা
205
Updated: 1 year ago
  • ক
    উদার হতে
  • খ
    কঠোর হতে
  • গ
    মহান হতে
  • ঘ
    কর্মী হতে
189
Updated: 1 year ago
  • ক
    উপদেশ
  • খ
    সহিষ্ণুতা
  • গ
    উদারতা
  • ঘ
    কর্মী হতে
196
Updated: 1 year ago
  • ক
    মৌন-মহান হতে
  • খ
    সহিষ্ণুতা
  • গ
    তেজে জ্বলতে
  • ঘ
    অন্তরের বিশালতা
235
Updated: 1 year ago
  • ক
    সূর্য
  • খ
    মাটি
  • গ
    চাঁদ
  • ঘ
    বায়ু
232
শিক্ষকদের জন্য বিশেষভাবে তৈরি

১ ক্লিকে প্রশ্ন, শীট, সাজেশন ও
অনলাইন পরীক্ষা তৈরির সফটওয়্যার!

শুধু প্রশ্ন সিলেক্ট করুন — প্রশ্নপত্র অটোমেটিক তৈরি!

প্রশ্ন এডিট করা যাবে
জলছাপ দেয়া যাবে
ঠিকানা যুক্ত করা যাবে
Logo, Motto যুক্ত হবে
অটো প্রতিষ্ঠানের নাম
অটো সময়, পূর্ণমান
প্রশ্ন এডিট করা যাবে
জলছাপ দেয়া যাবে
ঠিকানা যুক্ত করা যাবে
Logo, Motto যুক্ত হবে
অটো প্রতিষ্ঠানের নাম
অটো সময়, পূর্ণমান
অটো নির্দেশনা (এডিটযোগ্য)
অটো বিষয় ও অধ্যায়
OMR সংযুক্ত করা যাবে
ফন্ট, কলাম, ডিভাইডার
প্রশ্ন/অপশন স্টাইল পরিবর্তন
সেট কোড, বিষয় কোড
অটো নির্দেশনা (এডিটযোগ্য)
অটো বিষয় ও অধ্যায়
OMR সংযুক্ত করা যাবে
ফন্ট, কলাম, ডিভাইডার
প্রশ্ন/অপশন স্টাইল পরিবর্তন
সেট কোড, বিষয় কোড
এখনই শুরু করুন ডেমো দেখুন
৫০,০০০+
শিক্ষক
৩০ লক্ষ+
প্রশ্নপত্র
মাত্র ১৫ পয়সায় প্রশ্নপত্র
১ ক্লিকে প্রশ্ন, শীট, সাজেশন তৈরি করুন আজই

Complete Exam
Preparation

Learn, practice, analyse and improve

1M+ downloads
4.6 · 8k+ Reviews

Question Analytics

মোট উত্তরদাতা

জন

সঠিক
ভুল
উত্তর নেই