100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

CSC148 Test Study Terms with Complete solutions

Rating
-
Sold
-
Pages
8
Grade
A+
Uploaded on
07-09-2024
Written in
2024/2025

CSC148 Test Study Terms with Complete solutions

Institution
CSC148
Course
CSC148









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
CSC148
Course
CSC148

Document information

Uploaded on
September 7, 2024
Number of pages
8
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

CSC148 Test Study Terms with Complete solutions
(

time of inserting and deleting in front of a list is proportional to its length



class _Node - ANSWER represents a single element of a list, and stores its item and the
next item after


class _node design - ANSWER item: Any
next: Optional[_Node]


def __init__(self, item: Any) -> None:
self.item = item
self.next = None


Linked List Class - ANSWER a list implementation of the List ADT



implementation - ANSWER _first: Optional[_Node]

def __init__(self) -> None: self._first = None




creating a linked list - ANSWER >>> linky = LinkedList()

, >>>node1 = _Node(10)
>>>node2 = _Node(20)
>>>node3 = _Node(30)
>>>node1.next = node2
>>>node2.next = node3
>>>node1.next is node2
>>>link._first = node1
>>>linky._first.item
10
>>>linky._first.next.item
20
>>>linky._first.next.next.item
30


linked list memory diagram - ANSWER


iterate through the linked list - ANSWER class LinkedList:
def iterate(self) -> None
curr = my_linked_list._first
while curr is not None:
...curr.item...
curr = curr.next


are linked lists stored in consecutive locations in memory? - ANSWER no


array_based list - ANSWER store references to elements in contiguous blocks

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
KenAli West Virginia University
View profile
Follow You need to be logged in order to follow users or courses
Sold
84
Member since
1 year
Number of followers
5
Documents
17177
Last sold
3 weeks ago

2.9

19 reviews

5
4
4
4
3
4
2
0
1
7

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions