Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Computer Science Introduction to Data Structures Merge Sort and Linked Lists The Merge Function

Aaron Uusitalo
Aaron Uusitalo
4,405 Points

Is the reason that we don't have to explicitly import the Node class because it is referenced in the LinkedList class?

No more details required, except this is a mandatory field.

2 Answers

Mustafa Başaran
Mustafa Başaran
28,045 Points

Hi Aaron, Both classes are defined on the same python file. So, there is no need to import anything.

Ernesto Salazar
Ernesto Salazar
21,555 Points

Hello there!, i'm doing these exercises with javascript but the following logic should remain the same for both languages, you only need to import the LinkedList basically because that LinkedList class is the one who manages the Node class internally and you don't need to make use of it.