Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

Aaron Uusitalo
Aaron Uusitalo
4,229 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,021 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,531 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.