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 3219028
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:35:49+00:00 2026-05-17T15:35:49+00:00

I have an exam next week in algorithms, and was given questions to prepare

  • 0

I have an exam next week in algorithms, and was given questions to prepare for it. One of these questions has me stumped though.

“Can we draw a red-black tree with 7 black nodes and 10 red nodes? why?”

It sounds like it could be answered quickly, but I can’t get my mind around it.

The CRLS gives us the maximum height of a RB tree with n internal nodes: 2*lg(n+1).

I think the problem could be solved using this lemma alone, but am not sure.

Any tips?

  • 1 1 Answer
  • 3 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-05-17T15:35:50+00:00Added an answer on May 17, 2026 at 3:35 pm

    Since this is exam preparation, I don’t want to give you a direct answer, but I think what you need to consider is the properties that govern how you build a Red-Black Tree:

    1. A node is either red or black.
    2. The root is black. (This rule is sometimes omitted from other definitions. Since the root can always be changed from red to black but not necessarily vice-versa this rule has little effect on analysis.)
    3. All leaves are black.
    4. Both children of every red node are black.
    5. Every simple path from a given node to any of its descendant leaves contains the same number of black nodes.

    (Stole these from the wikipedia page: http://en.wikipedia.org/wiki/Red-black_tree)

    Given the count of nodes you listed, can you meet all of these properties?

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

Sidebar

Related Questions

I have two Models, one that has the name Exam and one that has
I have a practice exam for my compilers course with the following questions that
Hey all yesterday i have given my GATE exam and in this exam there
I'm pretty close to an exam where I have to answer some questions about
Say you have a couple of Core Data entities .. Student and Exam. These
this is really hard question. I have an exam. And questions will be like
I have a folder called exam. This folder has 3 folders called math, physics
I have an exam tomorrow and I was trying to understand this doubly linked
I have one table TABLE_EXAM . i need to update the value of specific
I have a file that stores exam scores for a class of students. I

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.