SlideShare a Scribd company logo
The link to download
CS270 Module 4 Midterm Exam (Data
Structures (Grantham University)
1.

A ____ is a list in which each element contains a key, such that the key in the
element at position k in the list is at least as large as the key in the element at
position 2k + 1 (if it exists) and 2k + 2 (if it exists).

A) hemp

B) hash table

C) heap

Points Earned: 2.5/2.5

2.

A linked list is a collection of ____.

A) addresses

B) classes

C) nodes

Points Earned: 0.0/2.5

3.

The structured design approach is also known as ____.

A) top-down design

B) object design

C) bottom-up design

Points Earned: 2.5/2.5
4.

Operations, such as finding the height, determining the number of nodes,
checking whether the tree is empty, tree traversal, and so on, on AVL trees
cannot be implemented the same way they are implemented on binary trees.

A) True

B) False

Points Earned: 2.5/2.5

5.

____ iterators are forward iterators that can also iterate backward over the
elements.

A) Output

B) Bidirectional

C) Input

Points Earned: 2.5/2.5

6.

A list is ordered if its elements are ordered according to some criteria.

A) True

B) False

Points Earned: 0.0/2.5

7.

The analysis of algorithms enables programmers to decide which algorithm to
use for a specific application.

A) True

B) False

Points Earned: 2.5/2.5

8.
The number of key comparisons in a sequential search depends on the value
of the search item.

A) True

B) False

Points Earned: 2.5/2.5

9.

A precondition is a statement specifying the condition(s) that must be true
before the function is called.

A) True

B) False

Points Earned: 2.5/2.5

10.

The header node is placed at the ____ of a list.

A) end

B) middle

C) beginning

Points Earned: 2.5/2.5

11.

The copy constructor automatically executes when, as a parameter, an object
is passed by value.

A) True

B) False

Points Earned: 2.5/2.5

12.

When the destructor ____ the queue, it deallocates the memory occupied by
the elements of the queue.

A) allocates
B) destroys

C) instantiates

Points Earned: 2.5/2.5

13.

The expression vecList.front() moves an element to the front of the vector.

A) True

B) False

Points Earned: 2.5/2.5

14.

We can traverse a singly linked list backward starting from the last node.

A) True

B) False

Points Earned: 2.5/2.5

15.

When you declare a derived class object, this object inherits the members of
the base class, but the derived class object cannot directly access the ____.

A) base class constructors

B) private data members of the base class

C) data members in its own class

Points Earned: 2.5/2.5

16.

The expression vecCont.empty() empties the vector container of all elements.

A) True

B) False

Points Earned: 2.5/2.5
17.

The components of a class are called the ____ of the class.

A) objects

B) members

C) operators

Points Earned: 2.5/2.5

18.

In a doubly linked list, some of the operations require modification from how
they were implemented for a regular linked list, because of the ____ pointer(s)
in each node.

A) two

B) three

C) null

Points Earned: 2.5/2.5

19.

The syntax for accessing a class (struct) member using the operator -> is
____.

A) pointerVariableName&->classMemberName

B) pointerVariableName.classMemberName

C) pointerVariableName->classMemberName

Points Earned: 2.5/2.5

20.

If the list is stored in an array, we can traverse the list in either direction using
an ____.

A) increment variable

B) index variable

C) interface variable
Points Earned: 2.5/2.5

21.

With the help of the ____, two values can be combined into a single unit and,
therefore, can be treated as one unit.

A) class double

B) class tuple

C) class unit

D) class pair

Points Earned: 2.5/2.5

22.

The deque class is a type of container adapter.

A) True

B) False

Points Earned: 2.5/2.5

23.

The operation ____ reinitializes the stack to an empty state.

A) init

B) alloc

C) initializeStack

Points Earned: 2.5/2.5

24.

In the random probing method, the ith slot in the probe sequence is ____.

A) (h(X) % ri) + HTSize

B) (h(X) % HTSize) + ri

C) (h(X) + HTSize) % ri
D) (h(X) + ri) % HTSize

Points Earned: 2.5/2.5

25.

The binary search algorithm uses the ____ technique to search the list.

A) divide-and-divide

B) conquer-and-resign

C) divide-and-conquer

Points Earned: 2.5/2.5

26.

To define new classes, you create new ____ files.

A) friend

B) header

C) placeholder

Points Earned: 2.5/2.5

27.

To remove, or pop, an element from the stack ____.

A) incrementstackTop by 1

B) decrementstackTop by 1

C) invertstackTop

Points Earned: 2.5/2.5

28.

Every call to a recursive function requires the system to allocate memory for
the local variables and formal parameters

A) True

B) False
Points Earned: 2.5/2.5

29.

A technique in which one system models the behavior of another system is
called ____.

A) referencing

B) simulation

C) bench testing

Points Earned: 2.5/2.5

30.

Because a queue is an important data structure, the Standard Template
Library (STL) provides a class to implement queues in a program.

A) True

B) False

Points Earned: 2.5/2.5

31.

The derived class can redefine public member functions of a base class.

A) True

B) False

Points Earned: 0.0/2.5

32.

Containers are class templates.

A) True

B) False

Points Earned: 2.5/2.5

33.

Containers are essentially used ____.
A) to update objects that are part of a given set of elements

B) to manipulate data

C) to manage objects of a given type

Points Earned: 2.5/2.5

34.

In breadth first traversal, starting at the first vertex, the graph is traversed as
little as possible.

A) True

B) False

Points Earned: 2.5/2.5

35.

If the list is stored in a linked list, we can traverse the list in only one direction
starting at the first node because the links are only in one direction.

A) True

B) False

Points Earned: 2.5/2.5

36.

Default arguments can be used with an overloaded operator.

A) True

B) False

Points Earned: 2.5/2.5

37.

In a shallow copy, two pointers of different data types point to the same
memory.

A) True

B) False
Points Earned: 2.5/2.5

38.

In a ____, customers or jobs with higher priority are pushed to the front of the
queue.

A) false queue

B) priority queue

C) free queue

D) double queue

Points Earned: 2.5/2.5

39.

The statement vecList.push_back(elem) deletes the element elem from the
vector.

A) True

B) False

Points Earned: 2.5/2.5

40.

The use of a queue structure ensures that the items are processed in the
order they are received.

A) True

B) False

Points Earned: 2.5/2.5

More Related Content

Recently uploaded

“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Precisely
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
saastr
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
Ajin Abraham
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 

Recently uploaded (20)

“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
 
Artificial Intelligence and Electronic Warfare
Artificial Intelligence and Electronic WarfareArtificial Intelligence and Electronic Warfare
Artificial Intelligence and Electronic Warfare
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024Northern Engraving | Nameplate Manufacturing Process - 2024
Northern Engraving | Nameplate Manufacturing Process - 2024
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 

Featured

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
 

Featured (20)

AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 

Cs270 module 4 midterm exam (data structures (grantham university)

  • 1. The link to download CS270 Module 4 Midterm Exam (Data Structures (Grantham University) 1. A ____ is a list in which each element contains a key, such that the key in the element at position k in the list is at least as large as the key in the element at position 2k + 1 (if it exists) and 2k + 2 (if it exists). A) hemp B) hash table C) heap Points Earned: 2.5/2.5 2. A linked list is a collection of ____. A) addresses B) classes C) nodes Points Earned: 0.0/2.5 3. The structured design approach is also known as ____. A) top-down design B) object design C) bottom-up design Points Earned: 2.5/2.5
  • 2. 4. Operations, such as finding the height, determining the number of nodes, checking whether the tree is empty, tree traversal, and so on, on AVL trees cannot be implemented the same way they are implemented on binary trees. A) True B) False Points Earned: 2.5/2.5 5. ____ iterators are forward iterators that can also iterate backward over the elements. A) Output B) Bidirectional C) Input Points Earned: 2.5/2.5 6. A list is ordered if its elements are ordered according to some criteria. A) True B) False Points Earned: 0.0/2.5 7. The analysis of algorithms enables programmers to decide which algorithm to use for a specific application. A) True B) False Points Earned: 2.5/2.5 8.
  • 3. The number of key comparisons in a sequential search depends on the value of the search item. A) True B) False Points Earned: 2.5/2.5 9. A precondition is a statement specifying the condition(s) that must be true before the function is called. A) True B) False Points Earned: 2.5/2.5 10. The header node is placed at the ____ of a list. A) end B) middle C) beginning Points Earned: 2.5/2.5 11. The copy constructor automatically executes when, as a parameter, an object is passed by value. A) True B) False Points Earned: 2.5/2.5 12. When the destructor ____ the queue, it deallocates the memory occupied by the elements of the queue. A) allocates
  • 4. B) destroys C) instantiates Points Earned: 2.5/2.5 13. The expression vecList.front() moves an element to the front of the vector. A) True B) False Points Earned: 2.5/2.5 14. We can traverse a singly linked list backward starting from the last node. A) True B) False Points Earned: 2.5/2.5 15. When you declare a derived class object, this object inherits the members of the base class, but the derived class object cannot directly access the ____. A) base class constructors B) private data members of the base class C) data members in its own class Points Earned: 2.5/2.5 16. The expression vecCont.empty() empties the vector container of all elements. A) True B) False Points Earned: 2.5/2.5
  • 5. 17. The components of a class are called the ____ of the class. A) objects B) members C) operators Points Earned: 2.5/2.5 18. In a doubly linked list, some of the operations require modification from how they were implemented for a regular linked list, because of the ____ pointer(s) in each node. A) two B) three C) null Points Earned: 2.5/2.5 19. The syntax for accessing a class (struct) member using the operator -> is ____. A) pointerVariableName&->classMemberName B) pointerVariableName.classMemberName C) pointerVariableName->classMemberName Points Earned: 2.5/2.5 20. If the list is stored in an array, we can traverse the list in either direction using an ____. A) increment variable B) index variable C) interface variable
  • 6. Points Earned: 2.5/2.5 21. With the help of the ____, two values can be combined into a single unit and, therefore, can be treated as one unit. A) class double B) class tuple C) class unit D) class pair Points Earned: 2.5/2.5 22. The deque class is a type of container adapter. A) True B) False Points Earned: 2.5/2.5 23. The operation ____ reinitializes the stack to an empty state. A) init B) alloc C) initializeStack Points Earned: 2.5/2.5 24. In the random probing method, the ith slot in the probe sequence is ____. A) (h(X) % ri) + HTSize B) (h(X) % HTSize) + ri C) (h(X) + HTSize) % ri
  • 7. D) (h(X) + ri) % HTSize Points Earned: 2.5/2.5 25. The binary search algorithm uses the ____ technique to search the list. A) divide-and-divide B) conquer-and-resign C) divide-and-conquer Points Earned: 2.5/2.5 26. To define new classes, you create new ____ files. A) friend B) header C) placeholder Points Earned: 2.5/2.5 27. To remove, or pop, an element from the stack ____. A) incrementstackTop by 1 B) decrementstackTop by 1 C) invertstackTop Points Earned: 2.5/2.5 28. Every call to a recursive function requires the system to allocate memory for the local variables and formal parameters A) True B) False
  • 8. Points Earned: 2.5/2.5 29. A technique in which one system models the behavior of another system is called ____. A) referencing B) simulation C) bench testing Points Earned: 2.5/2.5 30. Because a queue is an important data structure, the Standard Template Library (STL) provides a class to implement queues in a program. A) True B) False Points Earned: 2.5/2.5 31. The derived class can redefine public member functions of a base class. A) True B) False Points Earned: 0.0/2.5 32. Containers are class templates. A) True B) False Points Earned: 2.5/2.5 33. Containers are essentially used ____.
  • 9. A) to update objects that are part of a given set of elements B) to manipulate data C) to manage objects of a given type Points Earned: 2.5/2.5 34. In breadth first traversal, starting at the first vertex, the graph is traversed as little as possible. A) True B) False Points Earned: 2.5/2.5 35. If the list is stored in a linked list, we can traverse the list in only one direction starting at the first node because the links are only in one direction. A) True B) False Points Earned: 2.5/2.5 36. Default arguments can be used with an overloaded operator. A) True B) False Points Earned: 2.5/2.5 37. In a shallow copy, two pointers of different data types point to the same memory. A) True B) False
  • 10. Points Earned: 2.5/2.5 38. In a ____, customers or jobs with higher priority are pushed to the front of the queue. A) false queue B) priority queue C) free queue D) double queue Points Earned: 2.5/2.5 39. The statement vecList.push_back(elem) deletes the element elem from the vector. A) True B) False Points Earned: 2.5/2.5 40. The use of a queue structure ensures that the items are processed in the order they are received. A) True B) False Points Earned: 2.5/2.5