Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8696659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:19:35+00:00 2026-06-13T01:19:35+00:00

Hy there, i’m new in java and I need to implement a dictionary over

  • 0

Hy there, i’m new in java and I need to implement a dictionary over a Binary Search Tree but I really have no idea where to start from.
I have to store in this dictionary some Students having a name and age.
So in the BST i will store the ages but where do I store the name of the student and how do I connect a name with a age field.

I would appreciate if you have an exemple of implementation for something like this, not necessairly all the code, but just the begining, so I cand start. If you don’t have it in java, a c++ code is also good.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T01:19:36+00:00Added an answer on June 13, 2026 at 1:19 am

    A dictionary is a datastructure that maps keys to values and allows querying the value for a given key. A binary search tree also has keys (which are used for the search) and can also have further payload data (the values). So a BST with payload data is actually already a dictionary.

    So, start by writing a usual BST implementation (cf. Wikipedia for simple implementations, e.g., http://en.wikipedia.org/wiki/Binary_search_tree). Add a payload attribute to the nodes. Add a function lookup(key) that will first search the node with key key (using usual BST lookup) and return the payload attribute of that node. Et voila, there you have your dictionary.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There have been multiple questions regarding this topic but I have never really settled
This could be a duplicate question, but I have no idea what search terms
There is a moment in my app, that I need to force to show
There's a Rails 3.2.3 web application which doesn't use any database. But in spite
There are nice SO question and answers about this issue, but these options didn't
There is this strange situation I'm fighting on. I have 3 pages, les call
There was some progress made to the earlier problem. Now there is a new
There is a component that I have been using since IE7 and had never
There are plenty of questions and answers to this like this question but I
There are numerous Agile software development methods. Which ones have you used in practice

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.