
Explore data structures and algorithms for coding interviews, including runtime analysis with big O, omega, and theta notations, and cover arrays, linked lists, trees, graphs, and core algorithms.
Explore runtime analysis of algorithms, focusing on time and space complexity. Learn how best, worst, and average cases are measured using Omega and Big O notations.
Analyze time and space complexity to see how an algorithm's efficiency scales with input size. Explore constant, linear, logarithmic, and other growth patterns, including binary search and linear search.
An instructor walks through how to determine time complexity and constant space in algorithms, using loop examples, discarding constants, and focusing on growth degree.
Analyze time and space complexity across classic algorithms, using examples of loops with doubling, halving, and linear growth to identify big O and logarithmic patterns.
Explore what an array is—a data structure that stores a group of elements in contiguous memory, accessed in constant time by a zero-based index, with fixed size.
Explains one dimensional arrays indexed by a single subscript stored contiguously in memory, and two dimensional arrays indexed by row and column, with examples, while not covering higher dimensional arrays.
Discover how one- and two-dimensional arrays are stored in random access memory, with elements mapped to consecutive memory locations in binary, enabling constant-time access.
Learn to create a one-dimensional array by declaring, instantiating, and initializing it, including one-statement initialization, accessing by index, and recognizing constant time operations for iteration and insertion.
Traverse a 1d array by iterating from index 0 to length-1 with a for loop, printing each element. Access is constant time, and the traversal has linear time complexity O(n).
Explore get, insert, update, and delete operations in a 1d array, using pseudocode to access, modify, and remove elements with constant time complexity.
Compare linear search and binary search to locate targets, using left, right, and middle indices; binary search requires a sorted array and runs in logarithmic time, returning index or -1.
Create a 2d array by declaring, instantiating, and initializing a matrix with 3 rows and 2 columns; assign values by row and column indices, discussing time complexity and constant time.
Learn how to get, insert, and update elements in a 2d array, illustrated with a 3x2 example, and analyze constant-time access versus loop-based insert operations with their time complexities.
Traverse a 2d array by iterating over its rows and columns, printing each element; conclude that time complexity is rows times columns with constant space.
Solve the move zeros problem in an array in place, moving zeros to the end while preserving the order of non-zero elements using a two-index approach.
Learn to remove duplicates from a sorted one-dimensional array in place using a two-pointer approach, producing a left region of distinct elements with no extra space.
Learn to rotate a matrix by 90 degrees clockwise in place by first flipping along the second diagonal, then flipping horizontally, with no extra space.
learn to traverse a 2d matrix in spiral order using four pointers (top, bottom, left, right) to collect elements; understand the algorithm and its O(mn) time complexity.
Explore how a linked list uses nodes with data and a next pointer to form a chain from head to tail, contrasting nonconsecutive memory with arrays that allow index-based access.
Explore four linked list types—single linked, circular single linked, doubly linked, and circular doubly linked—each defined by node data and forward and/or backward pointers.
Build a singly linked list in Java with a node (data, next) and head and tail; implement addNode and print, then traverse to display values.
Learn to implement insertion in a singly linked list, covering add at head, add at tail, and add at a specific index, with node connections and size updates.
Demonstrates traversing a singly linked list from head to tail and printing node values, and implements search returning index or -1 if not found, with O(n) time and constant space.
Delete a node at a given index in a singly linked list by updating head or tail and links, then delete the entire list via garbage collection.
Explore creating a circular singly linked list, inserting nodes at the tail, and printing the list by traversing from head through the cycle using the tail and next pointers.
Traverse a circular singly linked list from left to right, printing node values, then search a value and return its index or -1, in O(n) time and O(1) space.
Explore insertion in a circular singly linked list, including add at head, add at tail, and add at index, updating head, tail, and size.
Demonstrates deleting a node by index and deleting the entire list in a circular singly linked list, with head and tail updates and garbage collection.
Create a doubly linked list by adding nodes with data, linking next and prev pointers, and updating head and tail in constant time. Maintain correct links as nodes are added.
Learn traversing a doubly linked list and performing a linear search in Java, using a single current pointer to return the index or -1 with O(n) time and O(1) space.
Learn to insert nodes in a doubly linked list, including add at head and add at index, using a get node helper, with linear time and constant space.
Master deleting a node by index and deleting an entire doubly linked list, with boundary checks, pointer updates, and garbage collector, and understand the time and space complexity.
Explore creation and insertion in a circular doubly linked list, including head and tail updates, node connections, and constant time add tail operations for efficient data structure management.
Explore traversing and searching in a circular doubly linked list, implementing a search method returning index or -1 and a traversal method printing nodes with O(n) time and O(1) space.
this lecture covers insertion in a circular doubly linked list, showing add at head and add at index with code that updates head, tail, and links.
Delete at index and delete entire list for a circular doubly linked list are implemented and explained, including handling head, tail, previous node, size checks, and memory cleanup.
Reverse a singly linked list using iterative and recursive approaches, detailing pointers, head, next, memory connections, and time-space complexity.
Reverse a singly linked list iteratively using pointers to restructure links and return the new head. The method runs in O(n) time with constant space.
Explore the stack data structure, its last in, first out principle, push and pop operations, common checks like isEmpty and isFull, and real-world uses in compilers and browser back buttons.
Explore stack implementation options using arrays or linked lists, noting fixed size versus dynamic growth. Learn and implement push, pop, peek, is empty, and is full for both approaches.
The video demonstrates creating a stack with an array in Java, implementing push and pop in constant time and space, with overflow and underflow checks.
Explore array-based stack operations in Java, covering peak, isEmpty, isFull, and deleteStack, including printing the top element and understanding time and space complexity.
Implement a stack using a linked list in Java, focusing on push and pop, node structure with data and next pointer, and the head as the top of the stack.
Explore stack implementation with a linked list, focusing on peak, is empty, and deleteStack. Understand top element access, constant time and space complexity, and the garbage collector removes nodes.
Validate brackets with a stack and a hash table to ensure each closing bracket matches the correct opening bracket in the right order, with the empty string considered valid.
Decode the encoded string using a two-stack method to handle digit repeats and nested brackets, building the decoded result through a left-to-right traversal.
Understand the queue data structure, a first in, first out system with enqueue and dequeue operations and front checks. Apply it to CPU scheduling and call center queues.
Explore queue implementation options using array or linked list, including linear and circular queues, and address issues in array-based linear implementations.
Learn to implement a linear queue using an array in Java, covering enqueue, dequeue, checking empty or full, create and delete queue, with front and rear management and overflow/underflow handling.
Implement a circular queue using an array with front and rear indices and modulo length to reuse cells, enabling enqueue and dequeue in constant time and space.
Implement a linear queue using a linked list with front and rear pointers, including create queue, dequeue, peak, and is empty operations, with explicit time and space complexity notes.
Explore tree data structures as nonlinear hierarchies of nodes with roots and leaves, and see how binary and syntax trees enable faster data access in databases, compilers, and routing.
Learn key tree terminologies—root, leaf, edge, and ancestor—and how node links define structure, while distinguishing node height, depth, and the overall tree height and depth.
Learn about predecessor and successor in binary trees, defined as the immediate previous and next nodes in an inorder traversal, with examples.
Define a binary tree as a structure where every node has at most two children. Include left and right skewed examples and note its uses in routers and syntax trees.
Explore the types of binary trees—full binary tree, perfect binary tree, and complete binary tree—and see how internal nodes having two children and level conditions define each structure.
Explore binary tree representations by implementing with a linked list of nodes (left and right pointers) and with an array using root at index 1 and child formulas.
Create and grow a binary tree by inserting values using a queue to assign left and right children, while preparing for in-order, pre-order, post-order, and level-order traversals.
Traverse the binary tree using a queue to visit nodes from the root, checking each node for the given value and returning true when found or false if not present.
Learn how to delete a value from a binary tree by replacing the target with the deepest node found via level-order traversal and then removing that node.
Implement the delete binary tree method to set the root to null, allowing the garbage collector to reclaim all nodes and delete the entire tree in constant time and space.
Explore preorder, inorder, and postorder traversals of a binary tree, mastering recursive and iterative implementations for each order of visiting nodes.
Master binary tree preorder traversal using recursive and iterative methods, visiting root, left, then right, with stack-based and recursive solutions and insights on time and space complexity.
Explore binary tree inorder traversal, with recursive and iterative stack-based approaches. Learn how to build traversal results using a helper function and a stack, and understand time and space complexity.
Explore postorder traversal of a binary tree using recursive and iterative approaches, learning a stack-based method and left-right-root processing to build the result efficiently.
master level order traversal of a binary tree using recursive and iterative approaches to return node values level by level, with clear examples of level zero to level three.
Create a binary tree using a fixed-size array, initialize the last used index, and insert values sequentially. Map children with the 2i and 2i+1 indexing from the root.
Search for a value in a binary tree stored as an array by scanning indices from 1 to the last used index, returning the index or -1 if not found.
Delete a node from a binary tree by locating value, replacing it with the deepest node, and updating the last index (or returning -1 if not found), using constant space.
Demonstrate the delete binary tree method by setting the root pointer to null, allowing the garbage collector to reclaim RAM memory with constant time and space.
Learn how preorder traversal visits root, then left, then right in a binary tree, with an example sequence 10, 20, 40, 50, 30, 60, 70; applies index-based recursion.
Traverse a binary tree using in order traversal by visiting left, then root, then right, tracing the index-based algorithm and prints while noting time and space complexity.
Learn postorder traversal of a binary tree, visiting left, right, then the current node using an index-based approach with 2*i+1, and analyze its time and space complexity.
Understand level order traversal of a binary tree via an array, iterating from index 1 to the last used index to print nodes 10, 20, 30, 40, 50, 60, 70.
Learn what a binary search tree is and why it enables fast searches, with left subtrees containing smaller keys and right subtrees containing larger keys, achieving logarithmic time complexity.
Learn to create and insert in a binary tree with root, left and right children, using recursive insert to build and update the structure.
Examine preorder, in-order, postorder, and level-order traversals of a binary search tree, using both recursive and iterative approaches. Review node visit orders and their time and space complexity.
Learn to search for a value in a binary search tree by traversing from the root to left or right nodes, achieving logarithmic time and space complexity.
Delete a node in a binary search tree by locating the target and replacing it with the minimum value from the right subtree, preserving the tree's properties.
Explore the deletion operation in binary search trees, showing how unreferenced nodes are removed and how the algorithm's time and space complexity are analyzed.
Discover how a binary heap, a complete binary tree that satisfies the heap property, drives min-heap and max-heap structures for priority queue and sorting.
Compare binary heap implementation options, showing array-based heaps deliver logarithmic extract and insert and delete operations, while linked-list variants incur linear time and complicate root removal.
Implement a binary heap using an array, inserting values with a bottom-to-top sift-up and maintaining heap order via index math (2x, 2x+1) with log n time.
Explore size, isEmpty, and peek operations on a binary heap, using the top index to check emptiness and retrieve the root value with constant time and space.
Remove the root from the heap, replace it with the deepest node, and restore the heap by a top-down heapify that swaps with the smallest child.
Implement the delete heap method for a binary heap stored in an array, update the pointer to null, and rely on the garbage collector, while noting time and space complexity.
Explore the AVL tree, a self-balancing binary search tree defined by balance factors -1, 0, or 1, and see insertion, deletion, and search in logarithmic time with database indexing applications.
Create and search methods for an AVL tree, where each node holds value, height, left and right pointers, with search returning found node or false and logarithmic time and space.
Implement the insert method for an AVL tree, handle left-left balance conditions, and perform the left rotation to restore balance.
Learn how inserting a node can cause imbalance in a tree and restore balance using rotations: left-left, left-right, right-right, and right-left. The lecture covers balance factors and rotation steps.
Insert a value into a binary tree and apply the left-right condition, balancing by computing node heights and performing left and right rotations.
Explore the right-right condition in AVL trees during insertion, demonstrate necessary rotations to restore balance, and show how to compute node heights and balance factors.
learn how the right-left insertion case balances a binary search tree by computing balance factors and performing right and left rotations to restore balance.
Learn how to delete a node from an AVL tree, apply right or left rotations for the LL, LR, RL, RR cases, adjust balance factors, and maintain logarithmic time performance.
Learn how deleting a node in a tree works, updating references and relying on the garbage collector to free memory in constant time and space.
Welcome to "Data Structures and Algorithms for Coding Interview" course.
Want to land a job at a great tech industry like Google, Microsoft, Facebook, Netflix, Amazon, or other industries but you are intimidated by the foundation of data structures and algorithms skills for the job?
Many programmers who are "self taught", feel that one of the main disadvantages they face compared to college educated graduates in computer science is the fact that they don't have knowledge about algorithms, data structures and the notorious Big-O Notation. Get on the same level as someone with computer science degree by learning the fundamental building blocks of computer science which will give you a big boost during interviews.
Here is what you will learn in this course:
>> Algorithm Run Time Analysis - Big O - O(n) Notation
>> Array (1D, 2D Array)
>> Linked List (All Types of Linked List)
>> Stack Data Structure
>> Queue Data Structure
>> Binary Tree (Array, Linked List Implementation, BFS/DFS Traversal and more)
>> Binary Search Tree
>> Binary Heap
>> AVL Tree
>> Trie Data Structure
>> Searching Algorithms
>> Recursion
>> Sorting Algorithms
>> Dynamic Programming
>> Hashing
>> Graph*
Unlike most instructors, I am not a marketer or a salesperson. I am a self taught programmer(I studied statistics not computer science) who has worked and managed teams of engineers and have been in these interviews both as an interviewee as well as the interviewer.
Taking his experience in educational statistics and coding, Barik's courses will take you on an understanding of complex subjects that you never thought.
We have 30 days money back guarantee, so nothing to lose here.
See you inside the courses!