473,748 Members | 3,697 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

breadth-first traversal

i have 2 question in breadth-first traversal.your help will be
appreciated.
1. what is the purpose of the queue in breath-first traversal?
2 suppose you had a function call displayAtDepthN which when given a tree
and depth would display only the nodes at that depth. explain how this
could be used to give a breadth-first traversal of the tree,and why it
would not be as efficient as one using a queue.
Nov 7 '06 #1
2 3796
xandra wrote:
i have 2 question in breadth-first traversal.your help will be
appreciated.
1. what is the purpose of the queue in breath-first traversal?
2 suppose you had a function call displayAtDepthN which when given a tree
and depth would display only the nodes at that depth. explain how this
could be used to give a breadth-first traversal of the tree,and why it
would not be as efficient as one using a queue.

Tell you what, xandra, send us your instructor's email address, and
we'll just send the answers directly to him.

Nov 7 '06 #2
xandra wrote:
i have 2 question in breadth-first traversal.your help will be
appreciated.
1. what is the purpose of the queue in breath-first traversal?
2 suppose you had a function call displayAtDepthN which when given a
tree and depth would display only the nodes at that depth. explain
how this could be used to give a breadth-first traversal of the
tree,and why it would not be as efficient as one using a queue.
I think you need to ask about it in 'comp.programmi ng'. We here
discuss C++ _language_ and you don't seem to have any language query.

Also, read FAQ 5.2, while you're at it.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Nov 7 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

45
16908
by: Market Mutant | last post by:
I just wonder job selections, job openings and salary level of PHP programer or Perl programmer comparing to Java programmers. Is Java programmer's salary has a minimal of 60K in US? Are there many PHP jobs?
25
2195
by: Lewis Lang | last post by:
MCSD certification - is it still necessary to land a job? ... or, is it just a money-maker? Is it worth spending the money on the books and the exam? Thanks, Lewis Lang
11
8920
by: iceColdFire | last post by:
Hi, What is the Diff btwn Function overloading and overriding thanks, a.a.cpp
0
927
by: maruthi gadde via DotNetMonster.com | last post by:
i have a grid and in the footer i have 4 textboxes say length, breadth height and cube.now when i enter length ,breadth and height and when all three text boxes are populated and when i change the focus to the cube textbox i need to get the product of the values in the length ,breadth and height text box.Can u please give me the code -- Message posted via http://www.dotnetmonster.com
52
3779
by: lovecreatesbeauty | last post by:
Why the C standard committee doesn't provide a standard implementation including the C compiler and library when the language standard document is published? C works on the abstract model of low level machine. C stands for portability and platform and machine independent. If the C compiler and C standard library are written in C itself, is it possible that one "standard" C compiler plus library is enough? The standard implementation is...
3
1790
by: vinod | last post by:
Dear Experts, I'm working for aproduct based company, i need guidence from you in some respects 1) how to become expertise in functions and stored procedures? is there any good links for me, i'm a learner.of cource google is there, but i dont know the starting point.please provide me some good links, and your esteemed guidence
3
5484
by: spider007 | last post by:
Hi, I have some data in rows which I want them in columns. Below is an example: col1 col2 col3 ------ ----- ----- table length 45 table breadth 50 table height 60
6
3324
by: prigupta2 | last post by:
Rep_pic(num).Print(LSTR & VB6.Format(Description, "00") & Crlf & "BOTTOM", TAB(38), VB6.Format(Count, "00") & " " & VB6.Format(MLEN, "0.00") & " " & VB6.Format(MWID, "0.00"), TAB(71), VB6.Format(QTY9, "0.00")) Error 10 'Print' is not a member of 'System.Windows.Forms.Panel'. print is not use in vbdotne please help
1
902
by: prigupta2 | last post by:
hello i want to print report for my project like =============================================== Description no Length Breadth Depth Total [No*Length*Breadth*Depth# i want to use formula in total <without database> please help VB Dotnet
0
8989
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8828
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9537
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9367
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9319
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6795
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
3309
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2213
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.