
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Understand why learning data structures and algorithms boosts code efficiency, performance, and scalability for larger datasets. Develop problem-solving skills and prepare for technical interviews to advance your software career.
Explore how data structures organize and store data for efficient operations, differentiate linear and non-linear types, and examine arrays, linked lists, stacks, queues, trees, graphs, and heaps.
Explore what algorithms are: step-by-step instructions that process data to solve problems. Learn types such as searching, sorting, graph, and tree algorithms.
Master big O notation by measuring how time and space grow with input size, comparing algorithm efficiency. Explore time and space complexity, including constant and quadratic cases, with practical examples.
Explore linear complexity and big O of n, showing how runtime and space scale with input size in array operations, including for-each loops and creating a new array.
Explore constant complexity, where time and space stay fixed regardless of input size. See a function that prints array size and loop with no extra space, big O of one.
Explore quadratic complexity, or O(n^2), where time grows with the square of input size, illustrated by nested loops that print each element, showing inefficiency for large inputs.
Explore dominant and non dominant factors in big O notation and analyze a Python function with nested loops that yields O(n^2) time by dropping the n term.
Compare big O complexities from constant to quadratic, illustrating how constant time stays the same, logarithmic scales with log n, linear grows with n, and quadratic grows with n squared.
Study linked lists in which each node holds data and a next link; the head points to the first node, the tail to the last, with noncontiguous memory.
Implement the linked list and node classes in Java, define data and next pointer, initialize with null, and establish head and tail for an empty list.
Explore how to add elements to a linked list, including at the beginning, middle, end, and in an empty list, using head and tail pointers.
Implement append to add a new node at the end of the list, update the tail, and handle the empty-list case by setting head and tail to the new node.
Implement the prepend function for a linked list by creating a new node, linking it to the current head, and updating head (and tail when the list is empty).
Implement the print list function in Java to iterate through the linked list from the head, printing each node's value and moving current to next until null.
Remove elements from a linked list by handling four cases—beginning, end, middle, and only element—updating the head, tail, and pointers accordingly.
Implement the remove function for the linked list to delete a node by value, handling empty lists, removing head or the last node, and updating tail as needed.
Learn the time complexities of linked list operations. Prepending, deleting the first node, and appending operate in constant time, while traversal, searching, and removing non-first nodes are linear.
Explore when to choose linked lists for constant time insertions and deletions, dynamic size, and efficient middle insertions, contrasted with arrays.
Learn to implement a shopping cart with a linked list in Java, adding items, removing items, and printing the cart to reflect dynamic size and runtime changes.
Learn to use Java's built-in LinkedList from java.util, including adding and removing elements, checking size and emptiness, and accessing first, last, and indexed elements.
Implement a Java music playlist using a linked list to add songs, get current song, play next (removing it), check empty, and clear the playlist.
Solve the reverse linked list challenge on LeetCode with an iterative approach using prev, curr, and next to reverse node’s next pointer and return the new head.
Master the two-pointer trick on LeetCode to find the middle node in a linked list, returning the second middle when the length is even, with constant space and linear time.
Compute the maximum candies, then in a second pass mark true when candy plus extra meets or exceeds it for each kid, returning a boolean result array.
Merge two sorted linked lists into one by splicing nodes, pick the smaller node at each step, and append remaining nodes to achieve O(n+m) time and O(1) space.
solve the leetcode challenge remove nth node from end of list using a two-pointer approach with left and right at distance n, yielding one-pass O(N) time and O(1) space.
master the palindrome linked list challenge by using slow and fast pointers to find the middle, reverse the second half, and compare values for a linear time, constant space solution.
Explore doubly linked lists, where each node stores next and previous references, enabling traversal forward and backward from head to tail.
Implement a doubly linked list with a node class (data, prev, next) initialized to null, and a list with head and tail, plus upcoming methods append, prepend, delete, and printlist.
Append a new node to a doubly linked list: if empty, set head and tail to it; otherwise link tail.next to the node, set node.prev to tail, and update tail.
Prepend a node to a doubly linked list by creating a new node with the given data, updating head and tail when empty, and linking to the former first node.
Delete a node from a doubly linked list by locating the node with the given key and updating head, tail, and surrounding prev/next pointers for first, middle, and last cases.
Implement the print list function for a doubly linked list by iterating from head to null, printing each node's value, and ending with a newline.
Explore the time complexities of doubly linked lists, with constant time for prepend, append, and deletions at the beginning or end, and linear time for specific position operations and searching.
Explore how to implement a text editor cursor using a doubly linked list, enabling forward and backward cursor movement, insertion, deletion, and visualizing the cursor within the list.
Discover the stack data structure, a last in, first out collection where push adds and pull removes items; see an analogy with plates and the text editor undo feature.
Implement a generic Java stack with a static inner node class, define constructors, and expose top as the latest node where each node holds data and a next pointer.
Create a new node with the given data, set its next to the current top, and update top to the new node.
Implement isEmpty to return true when top is null, false otherwise. Implement pop by checking isEmpty, throwing empty stack exception if needed, saving top data, updating top, and returning data.
Explore a text editor undo use case built with a stack that stores word lengths in a string builder, enabling undo by popping and deleting the last word.
Explore the Java built-in stack from java.util, learn push, pop, peek, search, and isEmpty operations, plus their time complexities.
Solve the LeetCode challenge removing stars from a string by using a stack to pop each star and its closest left character, with insights on a left-to-right alternative.
Apply a stack-based approach to remove all adjacent duplicates in a string, yielding the final unique result, and analyze O(n) time and space complexity.
Explore the queue data structure as a linear, first in, first out system, using a real-life store line. Learn enqueue adds to the back and dequeue removes from the front.
Implement a generic Java queue using a linked list, with a private static class node for data and next, tracking head, tail, and size for future enqueue and dequeue.
Implement enqueue by creating a new node and attaching it to the back, updating head, tail, and size; if empty, set both head and tail to the new node.
Dequeue removes front element of queue; throw no such element exception if queue is empty. Store data in a T, update head, decrement size, return data, set tail to null.
Learn how to implement a print service with a queue, enqueueing documents and processing print requests in FIFO order.
Explore queue interface in Java, its fifo behavior, and how a linked list implements a queue with add for enqueue, pull for dequeue, beak to view front, and isempty checks.
Welcome to the Data Structures and Algorithms in Java Course!
Are you a Java programmer who wants to write efficient code and improve your programming and problem solving skills ?
Do you have an upcoming coding interview and you want to ace it with confidence ?
If the answer is yes, then this course is the right choice for you!
In this course you will learn everything about Data Structures and Algorithms and how to implement and use them in Java.
The concepts are explained with animations which makes it much more easier to understand and memorize.
You will also apply your knowledge throughout the course via coding exercises, real world use cases and Leetcode coding challenges with video solutions.
The course covers the following topics:
General
Why Should You Learn Data Structures and Algorithms ?
What are Data Structures ?
What are Algorithms ?
Big O Notation
Linear Complexity - O(n)
Constant Complexity - O(1)
Quadratic Complexity - O(n^2)
Logarithmic Complexity - O(logn)
Constants in Big O
Dominant and Non-Dominant Factors in Big O
Complexities Comparison
Data Structures
Linked Lists
Doubly Linked Lists
Stacks
Queues
Sets
Trees
Tries
Heaps
Hash Tables
Graphs
Algorithms
Linear Search
Binary Search
Bubble Sort
Insertion Sort
Selection Sort
Merge Sort
Recursion
Tree Traversal
Graph Traversal
I'm confident that you will enjoy this course, but if you for some reason are not happy with the course it's backed by Udemy's 30 day money back guarantee, so nothing to lose!
I'm excited to see you in the course, hit that enroll button and start your mastering Data Structures & Algorithms journey :)