Comp 210 MT2 Review
Flashcard
•
Computers
•
University
•
Practice Problem
•
Hard
Wayground Content
FREE Resource
Student preview

23 questions
Show all answers
1.
FLASHCARD QUESTION
Front
What is the reason why utilizing getters & setters are preferred to making instance variables public?
Back
It allows for enforcement of formatting / validation when getting & setting data.
2.
FLASHCARD QUESTION
Front
When implementing an interface, to implement a specific method we should use this keyword:
Back
@Override
3.
FLASHCARD QUESTION
Front
Which of the following would be the proper class header for a Java class implementing a simulation of a collection of things that can be compared?
Options:
public class Simulation<T implements Comparable<T>>
public class Simulation implements Comparable
public class Simulation
public class Simulation<T>
Back
public class Simulation<T implements Comparable<T>>
4.
FLASHCARD QUESTION
Front
TRUE OR FALSE: Searching for an element in a doubly linked list has a better average time complexity than searching through a singly linked list.
Back
False
5.
FLASHCARD QUESTION
Front
Assume we have a doubly linked list, and a particular element to be deleted's pointer is on hand (but NOTHING else). How does the time complexity for this deletion compare to if this was a singly linked list?
Back
Doubly: o(1), If Singly: o(n)
6.
FLASHCARD QUESTION
Front
Assume elements are inserted into a BST in exactly the following order: 52, 23, 77, 65, 9. What would the resulting BST look like?
Back
7.
FLASHCARD QUESTION
Front
The best case time complexity of searching a BST is o( _ )
Back
1
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
AP Statistics Semester Exam Review - Unit 3 MC
Flashcard
•
12th Grade - University
15 questions
Exam 2 Review
Flashcard
•
12th Grade - University
10 questions
Holi and St. Patrick's Day Trivia
Flashcard
•
KG
10 questions
Learn About Asthma
Flashcard
•
KG - University
15 questions
How Can I Smell Things From a Distance - Learning Set #2 Review
Flashcard
•
KG - University
15 questions
CPEN Flashcard Selection
Flashcard
•
University
20 questions
Review on Fluids - AP Physics 1
Flashcard
•
12th Grade - University
20 questions
Unit 4 Simple Probability Distributions
Flashcard
•
12th Grade - University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade