SlideShare a Scribd company logo
1 of 1
Download to read offline
Inclass, we discussed min-heaps. Ina min-heap the element ofthe heap withthe smallest keyis the root ofa binarytree. Amax-heap has as root
always the element withthe biggest keyand the relationship betweenthe keys ofa node and its parent is less thanor equal(). Your task is to
develop your ownbinarytree ADTand your ownflex-heap ADT. The flex-heap ADTmust implement a min- as wellas a max-heap. Apparently,
instead ofdefininga removeMinor removeMaxoperationyouwillonlyprovide a remove operationinyour flex-heap. It must be implemented
usingyour binarytree ADT. Youhave to implement these two ADTs inJava. The flex-heap ADThas to additionallysupport the dynamic switch
froma min- to a max-heap and vice versa:remove() removes and returns the element withthe smallest or biggest keyvalue dependingonthe heap
status (min-heap vs. max-heap) and repairs the flex-heap afterwards accordingly. toggleHeap() transforms a min- to a max-heap or vice versa.
switchMinHeap() transforms a max- to a min-heap. switchMaxHeap() transforms a min- to a max-heap. Binarytrees must be implemented withan
extendable array-list similar to what we discussed inclass and in§7.3.5 ofthe textbook. Youare not allowed to implement trees withlists. Further,
youare not allowed to use anyarray-list, queue, vector, (binary) tree, or heap interfaces alreadyavailable inJava. Your toggleHeap,
switchMinHeap, and switchMaxHeap operations must runinO(n) time. Allother flex-heap operations must be either inO(1) or O(logn). You
maysafelyassume for the binarytree and flex-heap ADTthat keys are oftype integer and values are oftype character. So, the use ofgenerics is
not required. Youhave to submit the followingdeliverables:a) Specificationofthe binarytree and flex-heap ADTs includingcomments about
assumptions and semantics (especiallyabout the 3 added flex-heap operations). b) Pseudo code ofyour implementationofthe binarytree and
flex-heap ADTs. Keep inmind that Java code willnot be considered as pseudo code. Your pseudo code must be ona higher and more abstract
level. c) Well-formatted and documented Java source code and the correspondingexecutable jar file withat least 20 different but representative
examples demonstratingthe functionalityofyour implemented ADTs. These examples should demonstrate allcases ofyour ADTfunctionality(e.g.,
alloperations ofyour ADTs, sufficient sizes offlex-heaps, sufficient number ofdownand up-heap, toggleHeap, switchMinHeap, and
switchMaxHeap operations). Youmust have separate tests for eachADTbut the majorityoftests should cover flex-heaps because theyare
implemented usingbinarytrees.

More Related Content

What's hot

Network simulator 2
Network simulator 2Network simulator 2
Network simulator 2AAKASH S
 
Network simulator 2
Network simulator 2Network simulator 2
Network simulator 2AAKASH S
 
W3C HTML5 KIG-How to write low garbage real-time javascript
W3C HTML5 KIG-How to write low garbage real-time javascriptW3C HTML5 KIG-How to write low garbage real-time javascript
W3C HTML5 KIG-How to write low garbage real-time javascriptChanghwan Yi
 
It's not you, it's me: Ending a 15 year relationship with RRD
It's not you, it's me: Ending a 15 year relationship with RRDIt's not you, it's me: Ending a 15 year relationship with RRD
It's not you, it's me: Ending a 15 year relationship with RRDEric Evans
 
Devry gsp 215 week 6 i lab virtual memory new
Devry gsp 215 week 6 i lab virtual memory newDevry gsp 215 week 6 i lab virtual memory new
Devry gsp 215 week 6 i lab virtual memory newwilliamethan912
 
Time series storage in Cassandra
Time series storage in CassandraTime series storage in Cassandra
Time series storage in CassandraEric Evans
 
Richard Salter: Using the Titanium OpenGL Module
Richard Salter: Using the Titanium OpenGL ModuleRichard Salter: Using the Titanium OpenGL Module
Richard Salter: Using the Titanium OpenGL ModuleAxway Appcelerator
 
Upload keynote to can view it.
Upload keynote to can view it.Upload keynote to can view it.
Upload keynote to can view it.Berna Castro
 
"Metrics: Where and How", Vsevolod Polyakov
"Metrics: Where and How", Vsevolod Polyakov"Metrics: Where and How", Vsevolod Polyakov
"Metrics: Where and How", Vsevolod PolyakovYulia Shcherbachova
 
.Net Garbage Collector 101
.Net Garbage Collector 101.Net Garbage Collector 101
.Net Garbage Collector 101Woody Pewitt
 
Chapter24 operator-overloading
Chapter24 operator-overloadingChapter24 operator-overloading
Chapter24 operator-overloadingDeepak Singh
 
Cassandra&map reduce
Cassandra&map reduceCassandra&map reduce
Cassandra&map reducevlaskinvlad
 
Q1 create a java desktop application to find the largest number among the t...
Q1  create a java desktop application to find the largest number  among the t...Q1  create a java desktop application to find the largest number  among the t...
Q1 create a java desktop application to find the largest number among the t...Manoj Bhakuni
 
Hadoop導入事例 in クックパッド
Hadoop導入事例 in クックパッドHadoop導入事例 in クックパッド
Hadoop導入事例 in クックパッドTatsuya Sasaki
 
Heaps
HeapsHeaps
HeapsIIUM
 

What's hot (20)

Network simulator 2
Network simulator 2Network simulator 2
Network simulator 2
 
Network simulator 2
Network simulator 2Network simulator 2
Network simulator 2
 
W3C HTML5 KIG-How to write low garbage real-time javascript
W3C HTML5 KIG-How to write low garbage real-time javascriptW3C HTML5 KIG-How to write low garbage real-time javascript
W3C HTML5 KIG-How to write low garbage real-time javascript
 
It's not you, it's me: Ending a 15 year relationship with RRD
It's not you, it's me: Ending a 15 year relationship with RRDIt's not you, it's me: Ending a 15 year relationship with RRD
It's not you, it's me: Ending a 15 year relationship with RRD
 
Devry gsp 215 week 6 i lab virtual memory new
Devry gsp 215 week 6 i lab virtual memory newDevry gsp 215 week 6 i lab virtual memory new
Devry gsp 215 week 6 i lab virtual memory new
 
Raster package jacob
Raster package jacobRaster package jacob
Raster package jacob
 
RxSubject And Operators
RxSubject And OperatorsRxSubject And Operators
RxSubject And Operators
 
Time series storage in Cassandra
Time series storage in CassandraTime series storage in Cassandra
Time series storage in Cassandra
 
Richard Salter: Using the Titanium OpenGL Module
Richard Salter: Using the Titanium OpenGL ModuleRichard Salter: Using the Titanium OpenGL Module
Richard Salter: Using the Titanium OpenGL Module
 
Toy Model Overview
Toy Model OverviewToy Model Overview
Toy Model Overview
 
Blockchain introduction
Blockchain introductionBlockchain introduction
Blockchain introduction
 
Upload keynote to can view it.
Upload keynote to can view it.Upload keynote to can view it.
Upload keynote to can view it.
 
"Metrics: Where and How", Vsevolod Polyakov
"Metrics: Where and How", Vsevolod Polyakov"Metrics: Where and How", Vsevolod Polyakov
"Metrics: Where and How", Vsevolod Polyakov
 
.Net Garbage Collector 101
.Net Garbage Collector 101.Net Garbage Collector 101
.Net Garbage Collector 101
 
Chapter24 operator-overloading
Chapter24 operator-overloadingChapter24 operator-overloading
Chapter24 operator-overloading
 
Cassandra&map reduce
Cassandra&map reduceCassandra&map reduce
Cassandra&map reduce
 
Q1 create a java desktop application to find the largest number among the t...
Q1  create a java desktop application to find the largest number  among the t...Q1  create a java desktop application to find the largest number  among the t...
Q1 create a java desktop application to find the largest number among the t...
 
C07.heaps
C07.heapsC07.heaps
C07.heaps
 
Hadoop導入事例 in クックパッド
Hadoop導入事例 in クックパッドHadoop導入事例 in クックパッド
Hadoop導入事例 in クックパッド
 
Heaps
HeapsHeaps
Heaps
 

Similar to In class, we discussed min-heaps. In a min-heap the element of the heap with the smallest key is the

Distributed Realtime Computation using Apache Storm
Distributed Realtime Computation using Apache StormDistributed Realtime Computation using Apache Storm
Distributed Realtime Computation using Apache Stormthe100rabh
 
A Domain-Specific Embedded Language for Programming Parallel Architectures.
A Domain-Specific Embedded Language for Programming Parallel Architectures.A Domain-Specific Embedded Language for Programming Parallel Architectures.
A Domain-Specific Embedded Language for Programming Parallel Architectures.Jason Hearne-McGuiness
 
Lab11bRevf.docLab 11b Alien InvasionCS 122 • 15 Points .docx
Lab11bRevf.docLab 11b Alien InvasionCS 122 • 15 Points .docxLab11bRevf.docLab 11b Alien InvasionCS 122 • 15 Points .docx
Lab11bRevf.docLab 11b Alien InvasionCS 122 • 15 Points .docxDIPESH30
 
最新のデータベース技術の方向性で思うこと
最新のデータベース技術の方向性で思うこと最新のデータベース技術の方向性で思うこと
最新のデータベース技術の方向性で思うことMasayoshi Hagiwara
 
Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...
Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...
Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...InfluxData
 
C standard library functions
C standard library functionsC standard library functions
C standard library functionsVaishnavee Sharma
 
Gráficas en python
Gráficas en python Gráficas en python
Gráficas en python Jhon Valle
 
Getting started with Hadoop, Hive, and Elastic MapReduce
Getting started with Hadoop, Hive, and Elastic MapReduceGetting started with Hadoop, Hive, and Elastic MapReduce
Getting started with Hadoop, Hive, and Elastic MapReduceobdit
 
Functional programming with Scala
Functional programming with ScalaFunctional programming with Scala
Functional programming with ScalaNeelkanth Sachdeva
 
Functional Programming With Scala
Functional Programming With ScalaFunctional Programming With Scala
Functional Programming With ScalaKnoldus Inc.
 
Spark 4th Meetup Londond - Building a Product with Spark
Spark 4th Meetup Londond - Building a Product with SparkSpark 4th Meetup Londond - Building a Product with Spark
Spark 4th Meetup Londond - Building a Product with Sparksamthemonad
 

Similar to In class, we discussed min-heaps. In a min-heap the element of the heap with the smallest key is the (20)

Distributed Realtime Computation using Apache Storm
Distributed Realtime Computation using Apache StormDistributed Realtime Computation using Apache Storm
Distributed Realtime Computation using Apache Storm
 
C++ Homework Help
C++ Homework HelpC++ Homework Help
C++ Homework Help
 
A Domain-Specific Embedded Language for Programming Parallel Architectures.
A Domain-Specific Embedded Language for Programming Parallel Architectures.A Domain-Specific Embedded Language for Programming Parallel Architectures.
A Domain-Specific Embedded Language for Programming Parallel Architectures.
 
Oct.22nd.Presentation.Final
Oct.22nd.Presentation.FinalOct.22nd.Presentation.Final
Oct.22nd.Presentation.Final
 
Lab11bRevf.docLab 11b Alien InvasionCS 122 • 15 Points .docx
Lab11bRevf.docLab 11b Alien InvasionCS 122 • 15 Points .docxLab11bRevf.docLab 11b Alien InvasionCS 122 • 15 Points .docx
Lab11bRevf.docLab 11b Alien InvasionCS 122 • 15 Points .docx
 
Matlab Manual
Matlab ManualMatlab Manual
Matlab Manual
 
Matlab-3.pptx
Matlab-3.pptxMatlab-3.pptx
Matlab-3.pptx
 
最新のデータベース技術の方向性で思うこと
最新のデータベース技術の方向性で思うこと最新のデータベース技術の方向性で思うこと
最新のデータベース技術の方向性で思うこと
 
Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...
Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...
Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...
 
C standard library functions
C standard library functionsC standard library functions
C standard library functions
 
Collections forceawakens
Collections forceawakensCollections forceawakens
Collections forceawakens
 
Design Pattern Cheatsheet
Design Pattern CheatsheetDesign Pattern Cheatsheet
Design Pattern Cheatsheet
 
Scilab vs matlab
Scilab vs matlabScilab vs matlab
Scilab vs matlab
 
Gráficas en python
Gráficas en python Gráficas en python
Gráficas en python
 
Getting started with Hadoop, Hive, and Elastic MapReduce
Getting started with Hadoop, Hive, and Elastic MapReduceGetting started with Hadoop, Hive, and Elastic MapReduce
Getting started with Hadoop, Hive, and Elastic MapReduce
 
Tutorial2
Tutorial2Tutorial2
Tutorial2
 
Functional programming with Scala
Functional programming with ScalaFunctional programming with Scala
Functional programming with Scala
 
Matlab gnu octave
Matlab gnu octaveMatlab gnu octave
Matlab gnu octave
 
Functional Programming With Scala
Functional Programming With ScalaFunctional Programming With Scala
Functional Programming With Scala
 
Spark 4th Meetup Londond - Building a Product with Spark
Spark 4th Meetup Londond - Building a Product with SparkSpark 4th Meetup Londond - Building a Product with Spark
Spark 4th Meetup Londond - Building a Product with Spark
 

More from licservernoida

Biol 1322 crn (course number)name datebiol 1322 crn (c
Biol 1322   crn (course number)name datebiol 1322 crn (cBiol 1322   crn (course number)name datebiol 1322 crn (c
Biol 1322 crn (course number)name datebiol 1322 crn (clicservernoida
 
Being in the nursing field you will come across many different e
Being in the nursing field you will come across many different eBeing in the nursing field you will come across many different e
Being in the nursing field you will come across many different elicservernoida
 
Assume that chocolate bliss, the fictitious company in the cours
Assume that chocolate bliss, the fictitious company in the coursAssume that chocolate bliss, the fictitious company in the cours
Assume that chocolate bliss, the fictitious company in the courslicservernoida
 
Assignment in this assignment you will start on proposing ideas
Assignment in this assignment you will start on proposing ideasAssignment in this assignment you will start on proposing ideas
Assignment in this assignment you will start on proposing ideaslicservernoida
 
Assignment 1-case study assignment questionplease re
Assignment 1-case study assignment questionplease reAssignment 1-case study assignment questionplease re
Assignment 1-case study assignment questionplease relicservernoida
 
Assignment 1-case study assignment question
Assignment 1-case study assignment question       Assignment 1-case study assignment question
Assignment 1-case study assignment question licservernoida
 
Assignment strategic planning and financial management pre
Assignment strategic planning and financial management preAssignment strategic planning and financial management pre
Assignment strategic planning and financial management prelicservernoida
 
Assignment 1 supply and demand videoafter reviewing the video you
Assignment 1 supply and demand videoafter reviewing the video youAssignment 1 supply and demand videoafter reviewing the video you
Assignment 1 supply and demand videoafter reviewing the video youlicservernoida
 
Assignment 1 executive memo you are the ceo of a healthcare or
Assignment 1 executive memo you are the ceo of a healthcare orAssignment 1 executive memo you are the ceo of a healthcare or
Assignment 1 executive memo you are the ceo of a healthcare orlicservernoida
 
Assignment 1 (to be submitted through the assignment submiss
Assignment 1 (to be submitted through the assignment submissAssignment 1 (to be submitted through the assignment submiss
Assignment 1 (to be submitted through the assignment submisslicservernoida
 
6 the constitution and the new republic· framing a new governme
6 the constitution and the new republic· framing a new governme6 the constitution and the new republic· framing a new governme
6 the constitution and the new republic· framing a new governmelicservernoida
 
2 the dental hygienists guide tonutritional care
2 the dental hygienists guide tonutritional care2 the dental hygienists guide tonutritional care
2 the dental hygienists guide tonutritional carelicservernoida
 
2 healthcares vulnerability to ransomware attacks by abhilas
2 healthcares vulnerability to ransomware attacks by abhilas2 healthcares vulnerability to ransomware attacks by abhilas
2 healthcares vulnerability to ransomware attacks by abhilaslicservernoida
 
1 tenea lewissocw 6301methodological approach
1 tenea lewissocw 6301methodological approach1 tenea lewissocw 6301methodological approach
1 tenea lewissocw 6301methodological approachlicservernoida
 
1 solitary confinementolen jessiedepartment name, p
1 solitary confinementolen jessiedepartment name, p1 solitary confinementolen jessiedepartment name, p
1 solitary confinementolen jessiedepartment name, plicservernoida
 
1.)what actions and behaviors might a health leader perform to proac
1.)what actions and behaviors might a health leader perform to proac1.)what actions and behaviors might a health leader perform to proac
1.)what actions and behaviors might a health leader perform to proaclicservernoida
 
1.  a family is gathered around in the icu waiting room to monitor t
1.  a family is gathered around in the icu waiting room to monitor t1.  a family is gathered around in the icu waiting room to monitor t
1.  a family is gathered around in the icu waiting room to monitor tlicservernoida
 
1. the writer has used a letter ing system to describe the
1. the writer has used a letter ing system to  describe the 1. the writer has used a letter ing system to  describe the
1. the writer has used a letter ing system to describe the licservernoida
 
1. for this assignment, i want you to pick a popular song (aim to
1. for this assignment, i want you to pick a popular song (aim to 1. for this assignment, i want you to pick a popular song (aim to
1. for this assignment, i want you to pick a popular song (aim to licservernoida
 
1. considering the information provided in the case study, do you
1. considering the information provided in the case study, do you 1. considering the information provided in the case study, do you
1. considering the information provided in the case study, do you licservernoida
 

More from licservernoida (20)

Biol 1322 crn (course number)name datebiol 1322 crn (c
Biol 1322   crn (course number)name datebiol 1322 crn (cBiol 1322   crn (course number)name datebiol 1322 crn (c
Biol 1322 crn (course number)name datebiol 1322 crn (c
 
Being in the nursing field you will come across many different e
Being in the nursing field you will come across many different eBeing in the nursing field you will come across many different e
Being in the nursing field you will come across many different e
 
Assume that chocolate bliss, the fictitious company in the cours
Assume that chocolate bliss, the fictitious company in the coursAssume that chocolate bliss, the fictitious company in the cours
Assume that chocolate bliss, the fictitious company in the cours
 
Assignment in this assignment you will start on proposing ideas
Assignment in this assignment you will start on proposing ideasAssignment in this assignment you will start on proposing ideas
Assignment in this assignment you will start on proposing ideas
 
Assignment 1-case study assignment questionplease re
Assignment 1-case study assignment questionplease reAssignment 1-case study assignment questionplease re
Assignment 1-case study assignment questionplease re
 
Assignment 1-case study assignment question
Assignment 1-case study assignment question       Assignment 1-case study assignment question
Assignment 1-case study assignment question
 
Assignment strategic planning and financial management pre
Assignment strategic planning and financial management preAssignment strategic planning and financial management pre
Assignment strategic planning and financial management pre
 
Assignment 1 supply and demand videoafter reviewing the video you
Assignment 1 supply and demand videoafter reviewing the video youAssignment 1 supply and demand videoafter reviewing the video you
Assignment 1 supply and demand videoafter reviewing the video you
 
Assignment 1 executive memo you are the ceo of a healthcare or
Assignment 1 executive memo you are the ceo of a healthcare orAssignment 1 executive memo you are the ceo of a healthcare or
Assignment 1 executive memo you are the ceo of a healthcare or
 
Assignment 1 (to be submitted through the assignment submiss
Assignment 1 (to be submitted through the assignment submissAssignment 1 (to be submitted through the assignment submiss
Assignment 1 (to be submitted through the assignment submiss
 
6 the constitution and the new republic· framing a new governme
6 the constitution and the new republic· framing a new governme6 the constitution and the new republic· framing a new governme
6 the constitution and the new republic· framing a new governme
 
2 the dental hygienists guide tonutritional care
2 the dental hygienists guide tonutritional care2 the dental hygienists guide tonutritional care
2 the dental hygienists guide tonutritional care
 
2 healthcares vulnerability to ransomware attacks by abhilas
2 healthcares vulnerability to ransomware attacks by abhilas2 healthcares vulnerability to ransomware attacks by abhilas
2 healthcares vulnerability to ransomware attacks by abhilas
 
1 tenea lewissocw 6301methodological approach
1 tenea lewissocw 6301methodological approach1 tenea lewissocw 6301methodological approach
1 tenea lewissocw 6301methodological approach
 
1 solitary confinementolen jessiedepartment name, p
1 solitary confinementolen jessiedepartment name, p1 solitary confinementolen jessiedepartment name, p
1 solitary confinementolen jessiedepartment name, p
 
1.)what actions and behaviors might a health leader perform to proac
1.)what actions and behaviors might a health leader perform to proac1.)what actions and behaviors might a health leader perform to proac
1.)what actions and behaviors might a health leader perform to proac
 
1.  a family is gathered around in the icu waiting room to monitor t
1.  a family is gathered around in the icu waiting room to monitor t1.  a family is gathered around in the icu waiting room to monitor t
1.  a family is gathered around in the icu waiting room to monitor t
 
1. the writer has used a letter ing system to describe the
1. the writer has used a letter ing system to  describe the 1. the writer has used a letter ing system to  describe the
1. the writer has used a letter ing system to describe the
 
1. for this assignment, i want you to pick a popular song (aim to
1. for this assignment, i want you to pick a popular song (aim to 1. for this assignment, i want you to pick a popular song (aim to
1. for this assignment, i want you to pick a popular song (aim to
 
1. considering the information provided in the case study, do you
1. considering the information provided in the case study, do you 1. considering the information provided in the case study, do you
1. considering the information provided in the case study, do you
 

Recently uploaded

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 

Recently uploaded (20)

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 

In class, we discussed min-heaps. In a min-heap the element of the heap with the smallest key is the

  • 1. Inclass, we discussed min-heaps. Ina min-heap the element ofthe heap withthe smallest keyis the root ofa binarytree. Amax-heap has as root always the element withthe biggest keyand the relationship betweenthe keys ofa node and its parent is less thanor equal(). Your task is to develop your ownbinarytree ADTand your ownflex-heap ADT. The flex-heap ADTmust implement a min- as wellas a max-heap. Apparently, instead ofdefininga removeMinor removeMaxoperationyouwillonlyprovide a remove operationinyour flex-heap. It must be implemented usingyour binarytree ADT. Youhave to implement these two ADTs inJava. The flex-heap ADThas to additionallysupport the dynamic switch froma min- to a max-heap and vice versa:remove() removes and returns the element withthe smallest or biggest keyvalue dependingonthe heap status (min-heap vs. max-heap) and repairs the flex-heap afterwards accordingly. toggleHeap() transforms a min- to a max-heap or vice versa. switchMinHeap() transforms a max- to a min-heap. switchMaxHeap() transforms a min- to a max-heap. Binarytrees must be implemented withan extendable array-list similar to what we discussed inclass and in§7.3.5 ofthe textbook. Youare not allowed to implement trees withlists. Further, youare not allowed to use anyarray-list, queue, vector, (binary) tree, or heap interfaces alreadyavailable inJava. Your toggleHeap, switchMinHeap, and switchMaxHeap operations must runinO(n) time. Allother flex-heap operations must be either inO(1) or O(logn). You maysafelyassume for the binarytree and flex-heap ADTthat keys are oftype integer and values are oftype character. So, the use ofgenerics is not required. Youhave to submit the followingdeliverables:a) Specificationofthe binarytree and flex-heap ADTs includingcomments about assumptions and semantics (especiallyabout the 3 added flex-heap operations). b) Pseudo code ofyour implementationofthe binarytree and flex-heap ADTs. Keep inmind that Java code willnot be considered as pseudo code. Your pseudo code must be ona higher and more abstract level. c) Well-formatted and documented Java source code and the correspondingexecutable jar file withat least 20 different but representative examples demonstratingthe functionalityofyour implemented ADTs. These examples should demonstrate allcases ofyour ADTfunctionality(e.g., alloperations ofyour ADTs, sufficient sizes offlex-heaps, sufficient number ofdownand up-heap, toggleHeap, switchMinHeap, and switchMaxHeap operations). Youmust have separate tests for eachADTbut the majorityoftests should cover flex-heaps because theyare implemented usingbinarytrees.