CSE 214 Lecture 6: More ADT and LinkedLists

58 views3 pages

Document Summary

Class wide variables/methods that do not need to be instantiated with an object in order to be used. Static variables that are created will share that variable values. They are known as being class wide variables. If it is not static, each object will have its own instance or copy of that variable. Static methods can never access non static values. This is because there is no object that it can be applied to. Static methods are created so they are independent of the object. For for loops, it is most efficient if there are no gaps in between the data. With the remove method, items are logically removed instead of shifting all of the elements back. The program removes the item without preserving order. Best case scenarios: find() --> o(1) remove --> o(1) +o(1) Worst case scenarios: find() --> o(manyitems) remove() --> o(1) +o(manyitems) Static method - returns information about a set of one or more objects [union].

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers