SlideShare a Scribd company logo
Buy here:
http://theperfecthomework.com/cmsc-350-homework-3/
1.(15 points) Write a static recursive Java method that will accept an int and write the base 2
(binary) representation of that int, one bit per recursive call, to System.out.
2.(15 points) Write a static recursive Java method that will accept two int's (A and B) and will
write the representation of A base B, one character per call, to System.out. Assume that B is
less than 36, and use digits 0 through 9, followed by characters A through Z to represent the
characters of B. For example, 15 base 10 would be printed as F base 16.
3.(10 points) For the following tree, what is the order if the root is taken to be node A and the
tree is traversed
a)in pre-order
b)in post-order
c)in level-order
4.(10 points) For the tree in part 1, same questions but take the root as node L.
5.(10 points) In a 5-ary tree, that is a tree with at most 5 children at each node, how many
nodes can a tree of height H have. Recall that the height of a tree is a length of the longest
path from the root to the leaf nodes of the tree.
6.(10 points) In a 5-ary tree, what is the maximum height of a tree with N nodes. Since that
was easy, let's try one a little harder: what is the minimum height of a tree with N nodes?
7.(30 points) Write a recursive method listLinks that will list all the links in a tree or subtree of
a node. The context should be a Node (a class with a getChildren method that will return a
List <Node> of the child nodes of that node) and use the toString method of the Node class.
The output for each call of the listLinks method should be to System.out, with the first token
the representation of the node followed by a space-separated list of the children of the
node.Calling this method in the context of the root node of a tree will result in a listing of all
the links in the tree. The call would be something like:tree.root.listLinks ();The signature of
this method should be:void listLinks ()And you will use a method with the following
signature:List <Node> getChildren ()

More Related Content

What's hot

Binary tree
Binary treeBinary tree
Binary tree
Rajendran
 
Binary tree
Binary tree Binary tree
Binary tree
Rajendran
 
Threaded binarytree&heapsort
Threaded binarytree&heapsortThreaded binarytree&heapsort
Threaded binarytree&heapsort
Ssankett Negi
 
Data structures final lecture 1
Data structures final  lecture 1Data structures final  lecture 1
Data structures final lecture 1
Nazir Ahmed
 
Binary tree traversal ppt
Binary tree traversal pptBinary tree traversal ppt
Binary tree traversal ppt
PREEYANKAV
 
Lecture 8 data structures and algorithms
Lecture 8 data structures and algorithmsLecture 8 data structures and algorithms
Lecture 8 data structures and algorithms
Aakash deep Singhal
 
Binary tree
Binary treeBinary tree
Binary tree
Ssankett Negi
 
Trees, Binary Search Tree, AVL Tree in Data Structures
Trees, Binary Search Tree, AVL Tree in Data Structures Trees, Binary Search Tree, AVL Tree in Data Structures
Trees, Binary Search Tree, AVL Tree in Data Structures
Gurukul Kangri Vishwavidyalaya - Faculty of Engineering and Technology
 
B-Tree
B-TreeB-Tree
Chap 7 binary threaded tree
Chap 7 binary threaded treeChap 7 binary threaded tree
Chap 7 binary threaded tree
Raj Sarode
 
Trees in Data Structure
Trees in Data StructureTrees in Data Structure
Trees in Data Structure
Om Prakash
 
Tree traversal
Tree traversalTree traversal
Tree traversal
shamim alamgir
 
DATA STRUCTURES
DATA STRUCTURESDATA STRUCTURES
DATA STRUCTURES
bca2010
 
Tree
TreeTree
Tree
bhumish
 
B and B+ tree
B and B+ treeB and B+ tree
B and B+ tree
Ashish Arun
 
Btree
BtreeBtree
Red Black Trees
Red Black TreesRed Black Trees
Red Black Trees
Varun Mahajan
 
10 Red-Black Trees
10 Red-Black Trees10 Red-Black Trees
10 Red-Black Trees
Andres Mendez-Vazquez
 
Binary search tree(bst)
Binary search tree(bst)Binary search tree(bst)
Binary search tree(bst)
Hossain Md Shakhawat
 
Best for b trees
Best for b treesBest for b trees
Best for b trees
DineshRaaja
 

What's hot (20)

Binary tree
Binary treeBinary tree
Binary tree
 
Binary tree
Binary tree Binary tree
Binary tree
 
Threaded binarytree&heapsort
Threaded binarytree&heapsortThreaded binarytree&heapsort
Threaded binarytree&heapsort
 
Data structures final lecture 1
Data structures final  lecture 1Data structures final  lecture 1
Data structures final lecture 1
 
Binary tree traversal ppt
Binary tree traversal pptBinary tree traversal ppt
Binary tree traversal ppt
 
Lecture 8 data structures and algorithms
Lecture 8 data structures and algorithmsLecture 8 data structures and algorithms
Lecture 8 data structures and algorithms
 
Binary tree
Binary treeBinary tree
Binary tree
 
Trees, Binary Search Tree, AVL Tree in Data Structures
Trees, Binary Search Tree, AVL Tree in Data Structures Trees, Binary Search Tree, AVL Tree in Data Structures
Trees, Binary Search Tree, AVL Tree in Data Structures
 
B-Tree
B-TreeB-Tree
B-Tree
 
Chap 7 binary threaded tree
Chap 7 binary threaded treeChap 7 binary threaded tree
Chap 7 binary threaded tree
 
Trees in Data Structure
Trees in Data StructureTrees in Data Structure
Trees in Data Structure
 
Tree traversal
Tree traversalTree traversal
Tree traversal
 
DATA STRUCTURES
DATA STRUCTURESDATA STRUCTURES
DATA STRUCTURES
 
Tree
TreeTree
Tree
 
B and B+ tree
B and B+ treeB and B+ tree
B and B+ tree
 
Btree
BtreeBtree
Btree
 
Red Black Trees
Red Black TreesRed Black Trees
Red Black Trees
 
10 Red-Black Trees
10 Red-Black Trees10 Red-Black Trees
10 Red-Black Trees
 
Binary search tree(bst)
Binary search tree(bst)Binary search tree(bst)
Binary search tree(bst)
 
Best for b trees
Best for b treesBest for b trees
Best for b trees
 

Viewers also liked

CMSC 350 HOMEWORK 1
CMSC 350 HOMEWORK 1CMSC 350 HOMEWORK 1
CMSC 350 HOMEWORK 1
HamesKellor
 
Визитка - Селюшкина Е.Н.
Визитка - Селюшкина Е.Н.Визитка - Селюшкина Е.Н.
Визитка - Селюшкина Е.Н.
Zinaida Alexandrova
 
Stylish Window Treatments Ideas
Stylish Window Treatments IdeasStylish Window Treatments Ideas
Stylish Window Treatments Ideas
Jack ponting
 
Statewide Workforce Planning Update
Statewide Workforce Planning UpdateStatewide Workforce Planning Update
Statewide Workforce Planning Update
Massachusetts Department of Higher Education
 
FY18 Budget Recommendation
FY18 Budget RecommendationFY18 Budget Recommendation
Бібліотека як третє місце
Бібліотека як третє місцеБібліотека як третє місце
Бібліотека як третє місце
Rivnens'ka oblasna biblioteka dlya molodi
 
Bloque 4 imagen y sonido
Bloque 4 imagen y sonidoBloque 4 imagen y sonido
Bloque 4 imagen y sonido
María José Gómez Redondo
 
Bloque 2 elementos de configuración formal
Bloque 2 elementos de configuración formalBloque 2 elementos de configuración formal
Bloque 2 elementos de configuración formal
María José Gómez Redondo
 
Bloque 2 tecnicas de dibujo
Bloque 2 tecnicas de dibujoBloque 2 tecnicas de dibujo
Bloque 2 tecnicas de dibujo
María José Gómez Redondo
 

Viewers also liked (9)

CMSC 350 HOMEWORK 1
CMSC 350 HOMEWORK 1CMSC 350 HOMEWORK 1
CMSC 350 HOMEWORK 1
 
Визитка - Селюшкина Е.Н.
Визитка - Селюшкина Е.Н.Визитка - Селюшкина Е.Н.
Визитка - Селюшкина Е.Н.
 
Stylish Window Treatments Ideas
Stylish Window Treatments IdeasStylish Window Treatments Ideas
Stylish Window Treatments Ideas
 
Statewide Workforce Planning Update
Statewide Workforce Planning UpdateStatewide Workforce Planning Update
Statewide Workforce Planning Update
 
FY18 Budget Recommendation
FY18 Budget RecommendationFY18 Budget Recommendation
FY18 Budget Recommendation
 
Бібліотека як третє місце
Бібліотека як третє місцеБібліотека як третє місце
Бібліотека як третє місце
 
Bloque 4 imagen y sonido
Bloque 4 imagen y sonidoBloque 4 imagen y sonido
Bloque 4 imagen y sonido
 
Bloque 2 elementos de configuración formal
Bloque 2 elementos de configuración formalBloque 2 elementos de configuración formal
Bloque 2 elementos de configuración formal
 
Bloque 2 tecnicas de dibujo
Bloque 2 tecnicas de dibujoBloque 2 tecnicas de dibujo
Bloque 2 tecnicas de dibujo
 

Similar to CMSC 350 HOMEWORK 3

Consider this code using the ArrayBag of Section 5.2 and the Locat.docx
Consider this code using the ArrayBag of Section 5.2 and the Locat.docxConsider this code using the ArrayBag of Section 5.2 and the Locat.docx
Consider this code using the ArrayBag of Section 5.2 and the Locat.docx
maxinesmith73660
 
611+tutorial
611+tutorial611+tutorial
611+tutorial
Prudence Mashile
 
Ds 111011055724-phpapp01
Ds 111011055724-phpapp01Ds 111011055724-phpapp01
Ds 111011055724-phpapp01
Getachew Ganfur
 
Lecture notes data structures tree
Lecture notes data structures   treeLecture notes data structures   tree
Lecture notes data structures tree
maamir farooq
 
for sbi so Ds c c++ unix rdbms sql cn os
for sbi so   Ds c c++ unix rdbms sql cn osfor sbi so   Ds c c++ unix rdbms sql cn os
for sbi so Ds c c++ unix rdbms sql cn os
alisha230390
 
algo1
algo1algo1
Adobe
AdobeAdobe
Technical aptitude questions_e_book1
Technical aptitude questions_e_book1Technical aptitude questions_e_book1
Technical aptitude questions_e_book1
Sateesh Allu
 
Data structure tree- advance
Data structure tree- advanceData structure tree- advance
Data structure tree- advance
MD. MARUFUZZAMAN .
 
DS MCQS.pptx
DS MCQS.pptxDS MCQS.pptx
DS MCQS.pptx
BoomijaIT
 
Data Structures
Data StructuresData Structures
Data Structures
Nitesh Bichwani
 
17. Java data structures trees representation and traversal
17. Java data structures trees representation and traversal17. Java data structures trees representation and traversal
17. Java data structures trees representation and traversal
Intro C# Book
 
Data Structure
Data StructureData Structure
Data Structure
Karthikeyan A K
 
Data structure tree - intermediate
Data structure tree - intermediateData structure tree - intermediate
Data structure tree - intermediate
MD. MARUFUZZAMAN .
 
L&NDeltaTalk
L&NDeltaTalkL&NDeltaTalk
L&NDeltaTalk
Steve Sugden
 
Linked List, Types of Linked LIst, Various Operations, Applications of Linked...
Linked List, Types of Linked LIst, Various Operations, Applications of Linked...Linked List, Types of Linked LIst, Various Operations, Applications of Linked...
Linked List, Types of Linked LIst, Various Operations, Applications of Linked...
Balwant Gorad
 
algorithm Unit 5
algorithm Unit 5 algorithm Unit 5
algorithm Unit 5
Monika Choudhery
 
Trees unit 3
Trees unit 3Trees unit 3
Trees unit 3
praveena p
 
Binary trees
Binary treesBinary trees
Binary trees
Ssankett Negi
 
Data structure-question-bank
Data structure-question-bankData structure-question-bank
Data structure-question-bank
Jagan Mohan Bishoyi
 

Similar to CMSC 350 HOMEWORK 3 (20)

Consider this code using the ArrayBag of Section 5.2 and the Locat.docx
Consider this code using the ArrayBag of Section 5.2 and the Locat.docxConsider this code using the ArrayBag of Section 5.2 and the Locat.docx
Consider this code using the ArrayBag of Section 5.2 and the Locat.docx
 
611+tutorial
611+tutorial611+tutorial
611+tutorial
 
Ds 111011055724-phpapp01
Ds 111011055724-phpapp01Ds 111011055724-phpapp01
Ds 111011055724-phpapp01
 
Lecture notes data structures tree
Lecture notes data structures   treeLecture notes data structures   tree
Lecture notes data structures tree
 
for sbi so Ds c c++ unix rdbms sql cn os
for sbi so   Ds c c++ unix rdbms sql cn osfor sbi so   Ds c c++ unix rdbms sql cn os
for sbi so Ds c c++ unix rdbms sql cn os
 
algo1
algo1algo1
algo1
 
Adobe
AdobeAdobe
Adobe
 
Technical aptitude questions_e_book1
Technical aptitude questions_e_book1Technical aptitude questions_e_book1
Technical aptitude questions_e_book1
 
Data structure tree- advance
Data structure tree- advanceData structure tree- advance
Data structure tree- advance
 
DS MCQS.pptx
DS MCQS.pptxDS MCQS.pptx
DS MCQS.pptx
 
Data Structures
Data StructuresData Structures
Data Structures
 
17. Java data structures trees representation and traversal
17. Java data structures trees representation and traversal17. Java data structures trees representation and traversal
17. Java data structures trees representation and traversal
 
Data Structure
Data StructureData Structure
Data Structure
 
Data structure tree - intermediate
Data structure tree - intermediateData structure tree - intermediate
Data structure tree - intermediate
 
L&NDeltaTalk
L&NDeltaTalkL&NDeltaTalk
L&NDeltaTalk
 
Linked List, Types of Linked LIst, Various Operations, Applications of Linked...
Linked List, Types of Linked LIst, Various Operations, Applications of Linked...Linked List, Types of Linked LIst, Various Operations, Applications of Linked...
Linked List, Types of Linked LIst, Various Operations, Applications of Linked...
 
algorithm Unit 5
algorithm Unit 5 algorithm Unit 5
algorithm Unit 5
 
Trees unit 3
Trees unit 3Trees unit 3
Trees unit 3
 
Binary trees
Binary treesBinary trees
Binary trees
 
Data structure-question-bank
Data structure-question-bankData structure-question-bank
Data structure-question-bank
 

More from HamesKellor

CMST 290 FINAL EXAM
CMST 290 FINAL EXAMCMST 290 FINAL EXAM
CMST 290 FINAL EXAM
HamesKellor
 
CMST 301 PROJECT 1 CASE STUDY
CMST 301 PROJECT 1 CASE STUDYCMST 301 PROJECT 1 CASE STUDY
CMST 301 PROJECT 1 CASE STUDY
HamesKellor
 
CMSC 350 PROJECT 3
CMSC 350 PROJECT 3CMSC 350 PROJECT 3
CMSC 350 PROJECT 3
HamesKellor
 
CMSC 350 PROJECT 4
CMSC 350 PROJECT 4 CMSC 350 PROJECT 4
CMSC 350 PROJECT 4
HamesKellor
 
CMSC 350 PROJECT 4
CMSC 350 PROJECT 4CMSC 350 PROJECT 4
CMSC 350 PROJECT 4
HamesKellor
 
CMSC 350 PROJECT 1
CMSC 350 PROJECT 1CMSC 350 PROJECT 1
CMSC 350 PROJECT 1
HamesKellor
 
CMSC 350 FINAL PROJECT
CMSC 350 FINAL PROJECTCMSC 350 FINAL PROJECT
CMSC 350 FINAL PROJECT
HamesKellor
 
CMSC 350 HOMEWORK 2
CMSC 350 HOMEWORK 2CMSC 350 HOMEWORK 2
CMSC 350 HOMEWORK 2
HamesKellor
 
CMSC 335 HOMEWORK 3
CMSC 335 HOMEWORK 3CMSC 335 HOMEWORK 3
CMSC 335 HOMEWORK 3
HamesKellor
 
CMSC 330 PROJECT 1
CMSC 330 PROJECT 1CMSC 330 PROJECT 1
CMSC 330 PROJECT 1
HamesKellor
 
CMSC 335 FINAL PROJECT
CMSC 335 FINAL PROJECTCMSC 335 FINAL PROJECT
CMSC 335 FINAL PROJECT
HamesKellor
 
CMSC 330 QUIZ 4
CMSC 330 QUIZ 4CMSC 330 QUIZ 4
CMSC 330 QUIZ 4
HamesKellor
 
CMIT 425 RISK ASSESSMENT PAPER
CMIT 425 RISK ASSESSMENT PAPERCMIT 425 RISK ASSESSMENT PAPER
CMIT 425 RISK ASSESSMENT PAPER
HamesKellor
 
CMIT 391 LINUX IMPLEMENTATION PROPOSAL
CMIT 391 LINUX IMPLEMENTATION PROPOSALCMIT 391 LINUX IMPLEMENTATION PROPOSAL
CMIT 391 LINUX IMPLEMENTATION PROPOSAL
HamesKellor
 
CMIT/265 FINAL PROJECT NETWORK DESIGN PROPOSAL
CMIT/265 FINAL PROJECT NETWORK DESIGN PROPOSALCMIT/265 FINAL PROJECT NETWORK DESIGN PROPOSAL
CMIT/265 FINAL PROJECT NETWORK DESIGN PROPOSAL
HamesKellor
 
CMIT 321 WEEK 2 QUIZ.
CMIT 321 WEEK 2 QUIZ.CMIT 321 WEEK 2 QUIZ.
CMIT 321 WEEK 2 QUIZ.
HamesKellor
 
CMIT 370 FINAL EXAM
CMIT 370 FINAL EXAMCMIT 370 FINAL EXAM
CMIT 370 FINAL EXAM
HamesKellor
 
CMIT 350 FINAL EXAM CCNA CERTIFICATION PRACTICE EXAM
CMIT 350 FINAL EXAM CCNA CERTIFICATION PRACTICE EXAMCMIT 350 FINAL EXAM CCNA CERTIFICATION PRACTICE EXAM
CMIT 350 FINAL EXAM CCNA CERTIFICATION PRACTICE EXAM
HamesKellor
 
CMIT 321 QUIZ 4
CMIT 321 QUIZ 4CMIT 321 QUIZ 4
CMIT 321 QUIZ 4
HamesKellor
 
CMIT 321 WEEK 2 QUIZ
CMIT 321 WEEK 2 QUIZCMIT 321 WEEK 2 QUIZ
CMIT 321 WEEK 2 QUIZ
HamesKellor
 

More from HamesKellor (20)

CMST 290 FINAL EXAM
CMST 290 FINAL EXAMCMST 290 FINAL EXAM
CMST 290 FINAL EXAM
 
CMST 301 PROJECT 1 CASE STUDY
CMST 301 PROJECT 1 CASE STUDYCMST 301 PROJECT 1 CASE STUDY
CMST 301 PROJECT 1 CASE STUDY
 
CMSC 350 PROJECT 3
CMSC 350 PROJECT 3CMSC 350 PROJECT 3
CMSC 350 PROJECT 3
 
CMSC 350 PROJECT 4
CMSC 350 PROJECT 4 CMSC 350 PROJECT 4
CMSC 350 PROJECT 4
 
CMSC 350 PROJECT 4
CMSC 350 PROJECT 4CMSC 350 PROJECT 4
CMSC 350 PROJECT 4
 
CMSC 350 PROJECT 1
CMSC 350 PROJECT 1CMSC 350 PROJECT 1
CMSC 350 PROJECT 1
 
CMSC 350 FINAL PROJECT
CMSC 350 FINAL PROJECTCMSC 350 FINAL PROJECT
CMSC 350 FINAL PROJECT
 
CMSC 350 HOMEWORK 2
CMSC 350 HOMEWORK 2CMSC 350 HOMEWORK 2
CMSC 350 HOMEWORK 2
 
CMSC 335 HOMEWORK 3
CMSC 335 HOMEWORK 3CMSC 335 HOMEWORK 3
CMSC 335 HOMEWORK 3
 
CMSC 330 PROJECT 1
CMSC 330 PROJECT 1CMSC 330 PROJECT 1
CMSC 330 PROJECT 1
 
CMSC 335 FINAL PROJECT
CMSC 335 FINAL PROJECTCMSC 335 FINAL PROJECT
CMSC 335 FINAL PROJECT
 
CMSC 330 QUIZ 4
CMSC 330 QUIZ 4CMSC 330 QUIZ 4
CMSC 330 QUIZ 4
 
CMIT 425 RISK ASSESSMENT PAPER
CMIT 425 RISK ASSESSMENT PAPERCMIT 425 RISK ASSESSMENT PAPER
CMIT 425 RISK ASSESSMENT PAPER
 
CMIT 391 LINUX IMPLEMENTATION PROPOSAL
CMIT 391 LINUX IMPLEMENTATION PROPOSALCMIT 391 LINUX IMPLEMENTATION PROPOSAL
CMIT 391 LINUX IMPLEMENTATION PROPOSAL
 
CMIT/265 FINAL PROJECT NETWORK DESIGN PROPOSAL
CMIT/265 FINAL PROJECT NETWORK DESIGN PROPOSALCMIT/265 FINAL PROJECT NETWORK DESIGN PROPOSAL
CMIT/265 FINAL PROJECT NETWORK DESIGN PROPOSAL
 
CMIT 321 WEEK 2 QUIZ.
CMIT 321 WEEK 2 QUIZ.CMIT 321 WEEK 2 QUIZ.
CMIT 321 WEEK 2 QUIZ.
 
CMIT 370 FINAL EXAM
CMIT 370 FINAL EXAMCMIT 370 FINAL EXAM
CMIT 370 FINAL EXAM
 
CMIT 350 FINAL EXAM CCNA CERTIFICATION PRACTICE EXAM
CMIT 350 FINAL EXAM CCNA CERTIFICATION PRACTICE EXAMCMIT 350 FINAL EXAM CCNA CERTIFICATION PRACTICE EXAM
CMIT 350 FINAL EXAM CCNA CERTIFICATION PRACTICE EXAM
 
CMIT 321 QUIZ 4
CMIT 321 QUIZ 4CMIT 321 QUIZ 4
CMIT 321 QUIZ 4
 
CMIT 321 WEEK 2 QUIZ
CMIT 321 WEEK 2 QUIZCMIT 321 WEEK 2 QUIZ
CMIT 321 WEEK 2 QUIZ
 

Recently uploaded

IT Career Hacks Navigate the Tech Jungle with a Roadmap
IT Career Hacks Navigate the Tech Jungle with a RoadmapIT Career Hacks Navigate the Tech Jungle with a Roadmap
IT Career Hacks Navigate the Tech Jungle with a Roadmap
Base Camp
 
How to Prepare for Fortinet FCP_FAC_AD-6.5 Certification?
How to Prepare for Fortinet FCP_FAC_AD-6.5 Certification?How to Prepare for Fortinet FCP_FAC_AD-6.5 Certification?
How to Prepare for Fortinet FCP_FAC_AD-6.5 Certification?
NWEXAM
 
0624.speakingengagementsandteaching-01.pdf
0624.speakingengagementsandteaching-01.pdf0624.speakingengagementsandteaching-01.pdf
0624.speakingengagementsandteaching-01.pdf
Thomas GIRARD BDes
 
Leave-rules.ppt CCS leave rules 1972 for central govt employees
Leave-rules.ppt CCS leave rules 1972 for central govt employeesLeave-rules.ppt CCS leave rules 1972 for central govt employees
Leave-rules.ppt CCS leave rules 1972 for central govt employees
Sreenivas702647
 
thyroid case presentation.pptx Kamala's Lakshaman palatial
thyroid case presentation.pptx Kamala's Lakshaman palatialthyroid case presentation.pptx Kamala's Lakshaman palatial
thyroid case presentation.pptx Kamala's Lakshaman palatial
Aditya Raghav
 
lab.123456789123456789123456789123456789
lab.123456789123456789123456789123456789lab.123456789123456789123456789123456789
lab.123456789123456789123456789123456789
Ghh
 
5 Common Mistakes to Avoid During the Job Application Process.pdf
5 Common Mistakes to Avoid During the Job Application Process.pdf5 Common Mistakes to Avoid During the Job Application Process.pdf
5 Common Mistakes to Avoid During the Job Application Process.pdf
Alliance Jobs
 
官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样
官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样
官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样
2zjra9bn
 
Lbs last rank 2023 9988kr47h4744j445.pdf
Lbs last rank 2023 9988kr47h4744j445.pdfLbs last rank 2023 9988kr47h4744j445.pdf
Lbs last rank 2023 9988kr47h4744j445.pdf
ashiquepa3
 
Switching Careers Slides - JoyceMSullivan SocMediaFin - 2024Jun11.pdf
Switching Careers Slides - JoyceMSullivan SocMediaFin -  2024Jun11.pdfSwitching Careers Slides - JoyceMSullivan SocMediaFin -  2024Jun11.pdf
Switching Careers Slides - JoyceMSullivan SocMediaFin - 2024Jun11.pdf
SocMediaFin - Joyce Sullivan
 
Tape Measure Training & Practice Assessments.pdf
Tape Measure Training & Practice Assessments.pdfTape Measure Training & Practice Assessments.pdf
Tape Measure Training & Practice Assessments.pdf
KateRobinson68
 
Resumes, Cover Letters, and Applying Online
Resumes, Cover Letters, and Applying OnlineResumes, Cover Letters, and Applying Online
Resumes, Cover Letters, and Applying Online
Bruce Bennett
 
labb123456789123456789123456789123456789
labb123456789123456789123456789123456789labb123456789123456789123456789123456789
labb123456789123456789123456789123456789
Ghh
 
BUKU PENJAGAAN BUKU PENJAGAAN BUKU PENJAGAAN
BUKU PENJAGAAN BUKU PENJAGAAN BUKU PENJAGAANBUKU PENJAGAAN BUKU PENJAGAAN BUKU PENJAGAAN
BUKU PENJAGAAN BUKU PENJAGAAN BUKU PENJAGAAN
cahgading001
 
Introducing Gopay Mobile App For Environment.pptx
Introducing Gopay Mobile App For Environment.pptxIntroducing Gopay Mobile App For Environment.pptx
Introducing Gopay Mobile App For Environment.pptx
FauzanHarits1
 
Leadership Ambassador club Adventist module
Leadership Ambassador club Adventist moduleLeadership Ambassador club Adventist module
Leadership Ambassador club Adventist module
kakomaeric00
 
Job Finding Apps Everything You Need to Know in 2024
Job Finding Apps Everything You Need to Know in 2024Job Finding Apps Everything You Need to Know in 2024
Job Finding Apps Everything You Need to Know in 2024
SnapJob
 
Status of Women in Pakistan.pptxStatus of Women in Pakistan.pptx
Status of Women in Pakistan.pptxStatus of Women in Pakistan.pptxStatus of Women in Pakistan.pptxStatus of Women in Pakistan.pptx
Status of Women in Pakistan.pptxStatus of Women in Pakistan.pptx
MuhammadWaqasBaloch1
 
在线制作加拿大萨省大学毕业证文凭证书实拍图原版一模一样
在线制作加拿大萨省大学毕业证文凭证书实拍图原版一模一样在线制作加拿大萨省大学毕业证文凭证书实拍图原版一模一样
在线制作加拿大萨省大学毕业证文凭证书实拍图原版一模一样
2zjra9bn
 
Gabrielle M. A. Sinaga Portfolio, Film Student (2024)
Gabrielle M. A. Sinaga Portfolio, Film Student (2024)Gabrielle M. A. Sinaga Portfolio, Film Student (2024)
Gabrielle M. A. Sinaga Portfolio, Film Student (2024)
GabrielleSinaga
 

Recently uploaded (20)

IT Career Hacks Navigate the Tech Jungle with a Roadmap
IT Career Hacks Navigate the Tech Jungle with a RoadmapIT Career Hacks Navigate the Tech Jungle with a Roadmap
IT Career Hacks Navigate the Tech Jungle with a Roadmap
 
How to Prepare for Fortinet FCP_FAC_AD-6.5 Certification?
How to Prepare for Fortinet FCP_FAC_AD-6.5 Certification?How to Prepare for Fortinet FCP_FAC_AD-6.5 Certification?
How to Prepare for Fortinet FCP_FAC_AD-6.5 Certification?
 
0624.speakingengagementsandteaching-01.pdf
0624.speakingengagementsandteaching-01.pdf0624.speakingengagementsandteaching-01.pdf
0624.speakingengagementsandteaching-01.pdf
 
Leave-rules.ppt CCS leave rules 1972 for central govt employees
Leave-rules.ppt CCS leave rules 1972 for central govt employeesLeave-rules.ppt CCS leave rules 1972 for central govt employees
Leave-rules.ppt CCS leave rules 1972 for central govt employees
 
thyroid case presentation.pptx Kamala's Lakshaman palatial
thyroid case presentation.pptx Kamala's Lakshaman palatialthyroid case presentation.pptx Kamala's Lakshaman palatial
thyroid case presentation.pptx Kamala's Lakshaman palatial
 
lab.123456789123456789123456789123456789
lab.123456789123456789123456789123456789lab.123456789123456789123456789123456789
lab.123456789123456789123456789123456789
 
5 Common Mistakes to Avoid During the Job Application Process.pdf
5 Common Mistakes to Avoid During the Job Application Process.pdf5 Common Mistakes to Avoid During the Job Application Process.pdf
5 Common Mistakes to Avoid During the Job Application Process.pdf
 
官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样
官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样
官方认证美国旧金山州立大学毕业证学位证书案例原版一模一样
 
Lbs last rank 2023 9988kr47h4744j445.pdf
Lbs last rank 2023 9988kr47h4744j445.pdfLbs last rank 2023 9988kr47h4744j445.pdf
Lbs last rank 2023 9988kr47h4744j445.pdf
 
Switching Careers Slides - JoyceMSullivan SocMediaFin - 2024Jun11.pdf
Switching Careers Slides - JoyceMSullivan SocMediaFin -  2024Jun11.pdfSwitching Careers Slides - JoyceMSullivan SocMediaFin -  2024Jun11.pdf
Switching Careers Slides - JoyceMSullivan SocMediaFin - 2024Jun11.pdf
 
Tape Measure Training & Practice Assessments.pdf
Tape Measure Training & Practice Assessments.pdfTape Measure Training & Practice Assessments.pdf
Tape Measure Training & Practice Assessments.pdf
 
Resumes, Cover Letters, and Applying Online
Resumes, Cover Letters, and Applying OnlineResumes, Cover Letters, and Applying Online
Resumes, Cover Letters, and Applying Online
 
labb123456789123456789123456789123456789
labb123456789123456789123456789123456789labb123456789123456789123456789123456789
labb123456789123456789123456789123456789
 
BUKU PENJAGAAN BUKU PENJAGAAN BUKU PENJAGAAN
BUKU PENJAGAAN BUKU PENJAGAAN BUKU PENJAGAANBUKU PENJAGAAN BUKU PENJAGAAN BUKU PENJAGAAN
BUKU PENJAGAAN BUKU PENJAGAAN BUKU PENJAGAAN
 
Introducing Gopay Mobile App For Environment.pptx
Introducing Gopay Mobile App For Environment.pptxIntroducing Gopay Mobile App For Environment.pptx
Introducing Gopay Mobile App For Environment.pptx
 
Leadership Ambassador club Adventist module
Leadership Ambassador club Adventist moduleLeadership Ambassador club Adventist module
Leadership Ambassador club Adventist module
 
Job Finding Apps Everything You Need to Know in 2024
Job Finding Apps Everything You Need to Know in 2024Job Finding Apps Everything You Need to Know in 2024
Job Finding Apps Everything You Need to Know in 2024
 
Status of Women in Pakistan.pptxStatus of Women in Pakistan.pptx
Status of Women in Pakistan.pptxStatus of Women in Pakistan.pptxStatus of Women in Pakistan.pptxStatus of Women in Pakistan.pptx
Status of Women in Pakistan.pptxStatus of Women in Pakistan.pptx
 
在线制作加拿大萨省大学毕业证文凭证书实拍图原版一模一样
在线制作加拿大萨省大学毕业证文凭证书实拍图原版一模一样在线制作加拿大萨省大学毕业证文凭证书实拍图原版一模一样
在线制作加拿大萨省大学毕业证文凭证书实拍图原版一模一样
 
Gabrielle M. A. Sinaga Portfolio, Film Student (2024)
Gabrielle M. A. Sinaga Portfolio, Film Student (2024)Gabrielle M. A. Sinaga Portfolio, Film Student (2024)
Gabrielle M. A. Sinaga Portfolio, Film Student (2024)
 

CMSC 350 HOMEWORK 3

  • 1. Buy here: http://theperfecthomework.com/cmsc-350-homework-3/ 1.(15 points) Write a static recursive Java method that will accept an int and write the base 2 (binary) representation of that int, one bit per recursive call, to System.out. 2.(15 points) Write a static recursive Java method that will accept two int's (A and B) and will write the representation of A base B, one character per call, to System.out. Assume that B is less than 36, and use digits 0 through 9, followed by characters A through Z to represent the characters of B. For example, 15 base 10 would be printed as F base 16. 3.(10 points) For the following tree, what is the order if the root is taken to be node A and the tree is traversed a)in pre-order b)in post-order c)in level-order 4.(10 points) For the tree in part 1, same questions but take the root as node L. 5.(10 points) In a 5-ary tree, that is a tree with at most 5 children at each node, how many nodes can a tree of height H have. Recall that the height of a tree is a length of the longest path from the root to the leaf nodes of the tree. 6.(10 points) In a 5-ary tree, what is the maximum height of a tree with N nodes. Since that was easy, let's try one a little harder: what is the minimum height of a tree with N nodes? 7.(30 points) Write a recursive method listLinks that will list all the links in a tree or subtree of a node. The context should be a Node (a class with a getChildren method that will return a List <Node> of the child nodes of that node) and use the toString method of the Node class. The output for each call of the listLinks method should be to System.out, with the first token the representation of the node followed by a space-separated list of the children of the node.Calling this method in the context of the root node of a tree will result in a listing of all the links in the tree. The call would be something like:tree.root.listLinks ();The signature of
  • 2. this method should be:void listLinks ()And you will use a method with the following signature:List <Node> getChildren ()