Subjects
PRICING
COURSES
SIGN IN
Start Free Trial
Tim B.
Tutored hundreds of students with only positive reviews
Tutor Satisfaction Guarantee
Computer Science (General)
TutorMe
Question:

What is the difference between an array and a linked list.

Tim B.
Answer:

An array is an ordered collection with a fixed size. It's analogous to a parking lot. Data elements can move in and out of the parking spaces but the overall structure always stays the same. The performance of an array for common operations is: Access: O(1) Search: O(n) Insertion: O(n) Deletion: O(n) A linked list is an ordered collection with a dynamic size made up of individual nodes. It's analogous to a conga line. Data elements are attached directly to other data elements 1 by 1 instead of having an overall structure they fit into. The performance of a linked list for common operations is: Access: O(n) Search: O(n) Insertion: O(1) Deletion: O(1)

Java Programming
TutorMe
Question:

What is a method?

Tim B.
Answer:

A method is a block of reusable code that takes inputs and produces outputs. It's analogous to a factory that takes planks and screws and other inputs and produces outputs like chairs and tables. Once the factory or method is set up it can be invoked again and again. Their re-usability is their real strength and power. The first method you always use and are probably most familiar with in Java is: public static void main(String[] args) {} A simpler example might be: public int add(int first, int second) { return first + second; } We can go over how to break down the structure of a method in more detail upon request.

Python Programming
TutorMe
Question:

What is a class?

Tim B.
Answer:

A class is a way to bundle a set of variables and functions together to represent a real world object and get it to do interesting things. Once you've written the class you can reuse it over and over again. It becomes a functioning type just like all other types you've learned in Python so far like int and str. Lets take a Circle for example: class Circle: pi = 3.141592 def __init__(self, radius): self.radius = radius def getRadius(self): return self.radius def area(self): return self.radius * self.radius * Circle.pi This defines what it means to be a circle. A circle has a radius which is represented by self.radius and useful functions for working with the radius like getRadius() and area(). You can add any other variables or methods you think would be interesting for a circle to have like color or circumference. It's up to you.

Send a message explaining your
needs and Tim will reply soon.
Contact Tim
Ready now? Request a lesson.
Start Session
FAQs
What is a lesson?
A lesson is virtual lesson space on our platform where you and a tutor can communicate. You'll have the option to communicate using video/audio as well as text chat. You can also upload documents, edit papers in real time and use our cutting-edge virtual whiteboard.
How do I begin a lesson?
If the tutor is currently online, you can click the "Start Session" button above. If they are offline, you can always send them a message to schedule a lesson.
Who are TutorMe tutors?
Many of our tutors are current college students or recent graduates of top-tier universities like MIT, Harvard and USC. TutorMe has thousands of top-quality tutors available to work with you.