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

  • Home
  • SEARCH
  • 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 7955025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:36:29+00:00 2026-06-04T03:36:29+00:00

I am working on my practice final for a data structures class, and I

  • 0

I am working on my practice final for a data structures class, and I have a few questions I was hoping to get help with:

  1.  

    void BST::traverse(Vertex *V)  // post order traversal recursively
    {   
      if (V != NULL) 
        {
          traverse(V->Left);        
          traverse(V->Right);       
          cout << V->elem << endl;     
        }
    }
    

    I need to change this to depth-first search. I believe I have to re-visit the root each recursion to do so, but am confused because then I’d never leave the root. Perhaps a temporary root? Not sure!

  2. For our linked list implementation, I have to describe 2 occasions when our copy constructor is used. I know it is called for function calls. But what’s another reason?

  3. why do we use big O notation [e.g. O(n^2) instead of saying 2n^2 + 3n + 4). I know we ignore constants when doing so, but is there more to the answer I can give?

  4. Time vs. Space complexities. The most obvious to me is merge sort vs. quick sort, but can you think of another one in case the test asks for more? We went over so many in class that I can’t believe I can’t name more.

  • 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-04T03:36:31+00:00Added an answer on June 4, 2026 at 3:36 am
    1. It’s already a depth-first search if you just add the search code to it.

    2. You already have the occasion when a BST is passed by value to a function as an argument. What is another time that you make a copy of an object? (Hint: one is also related to functions)

    3. Because when n is large, 2n will be much much much larger than anything else in the equation so you just leave constants and everything else out. Big-O notation is definitely not meant to be precise, it’s only to let you know how a solution to a problem scales as the input grows very large. When n gets large enough, the complexity is so huge that the other stuff is dwarfed and it’s basically 2n.

    4. You’ll have to be more specific for this one. Are you looking for two algorithms that trade speed for space?

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

Sidebar

Related Questions

I have been working on a simple text editor in Cocoa/Objective-C for a practice
I have a similar to SO clone i am working on for practice. I
I have been working on creating an RPG combat sim for code-practice. A single
I've been working on creating my own Unix Shell in C to get practice
When working with web services, is it a good practice to have some sort
I am looking at writing an ecommerce platform just for working practice and a
I'm working on my C++ practice question to prepare for my upcoming test and
Im searching for the best practice (or any working solution) for the following scenario:
I'm just looking for best practice reassurance on working with jQuery and ASP.Net, before
What is best practice for C++ Public API? I am working on a C++

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.