CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2018
    Posts
    4

    I need help please solve this b tree exercise

    (a) Add the keys

    19,21,1,26,3,24,7,2,6,8,14,25,15,17
    into an initially empty B-tree of order 3. Draw the resulting trees.

    (b) Remove the keys one after the other

    17,21,19,3
    from the (3) resulting B-tree of order 3 and draw the resulting trees.

    i need a complete solution, please

    Thank you

  2. #2
    2kaud's Avatar
    2kaud is offline Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    7,825

    Re: I need help please solve this b tree exercise

    This looks like its homework? See http://forums.codeguru.com/showthrea...ork-assignment
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++23 Compiler: Microsoft VS2022 (17.6.5)

  3. #3
    Join Date
    Dec 2018
    Posts
    4

    Re: I need help please solve this b tree exercise

    (a) Give a formula for the probability P (n) that of n randomly selected persons, at least two have their birthday on the same day. Also indicate the derivation of your solution or justify its correctness. You can assume that each year has 365 days (none of them have their birthday on February 29th) and that birthdays are evenly distributed (there are no special events that lead to higher birth rates on certain days).
    (b) Determine the values ​​P (10), P (23), P (35) and P (50) to a minimum of 3 decimal places.
    (c) What did you calculate in this task related to hashing?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured