Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Challenge: Build a Simple B-Tree | Indexing and Search Structures
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Data Structures and Algorithms for Scalable Systems

bookChallenge: Build a Simple B-Tree

Tehtävä

Swipe to start coding

In this challenge, you will implement a simplified B-Tree — a balanced search tree widely used in databases and file systems.

Your task is to complete the implementation so that the tree supports:

insert(key):

  • Inserts a new key into the B-Tree.
  • Splits nodes when they overflow to maintain B-Tree properties.
  • The root must split correctly when full.
  • Insertion must always place keys in sorted order.

search(key):

  • Returns True if the key is present in the B-Tree.
  • Returns False if the key is not found.

Additional Rules:

  • The minimum degree t determines the minimum/maximum number of keys in each node.
  • You do not need to implement deletion or disk storage.
  • The tree must correctly handle multiple insertions and node splits.

Ratkaisu

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 2. Luku 4
single

single

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

Suggested prompts:

Can you explain this in simpler terms?

What are the main points I should remember?

Can you give me an example?

close

bookChallenge: Build a Simple B-Tree

Pyyhkäise näyttääksesi valikon

Tehtävä

Swipe to start coding

In this challenge, you will implement a simplified B-Tree — a balanced search tree widely used in databases and file systems.

Your task is to complete the implementation so that the tree supports:

insert(key):

  • Inserts a new key into the B-Tree.
  • Splits nodes when they overflow to maintain B-Tree properties.
  • The root must split correctly when full.
  • Insertion must always place keys in sorted order.

search(key):

  • Returns True if the key is present in the B-Tree.
  • Returns False if the key is not found.

Additional Rules:

  • The minimum degree t determines the minimum/maximum number of keys in each node.
  • You do not need to implement deletion or disk storage.
  • The tree must correctly handle multiple insertions and node splits.

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 2. Luku 4
single

single

some-alt