Join Raghavendra Dixit for an in-depth discussion in this video Doubly ended lists, part of Introduction to Data Structures & Algorithms in Java.
- [Instructor] Now we'll talk about…a certain type of a linked list,…which is called a doubly ended linked list.…As the name suggests,…this type of a linked list has two ends.…It has a head and a tail.…The tail refers to the last element of the linked list.…So in this type of a linked list,…we have references to two elements, the head and the tail,…unlike in case of a singly linked list…in which we have a reference to the head element alone.…In a doubly linked list,…we can add and delete elements at both the ends.…
That is the head and the tail.…Doubly linked lists are not really commonly used,…so we'll not discuss them in depth here.…Let's try the code to implement a doubly linked list now.…Create a new class, and name it DoublyEndedList.…Now inside this, we first declare two member variables,…head and tail.…And both are of type Node.…
In case of a doubly ended list,…we can add a new element either at the head…or at the tail, okay?…Adding to the head is quite similar…to what we have already seen.…So let's try the insertAtTail method,…
Note: This course was created by Packt Publishing. We are pleased to host this training in our library.
- Why study data structures and algorithms?
- How to calculate the time complexity
- Using Big O notation
- Using basic sorting and search algorithms
- Searching elements in unordered arrays and ordered arrays
- Implementing a linked list in Java
- Implementing stacks using arrays
- Queues using arrays
- Binary search trees
- Representing heaps using arrays
Skill Level Intermediate
1. Introduction to Algorithms
2. Analysis of Algorithms
3. Basic Sorting and Search Algorithms
4. Linked Lists
5. Stacks and Queues
7. Binary Search Trees
8. More Sorting Algorithms
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.