MAANG Interview Preparation Day 2 – Linked List

Hi there 🙏, today is June 22, 2024. So, I woke up at 7 AM ⏰ today, did some morning walk, yoga for 30 mins. Went to temple & then started the routine.

Today’s Plan – đź’Ż

June 22 (Sat): Study linked lists, practice easy problems. (4 hour…


This content originally appeared on DEV Community and was authored by Nishant Singh

Hi there 🙏, today is June 22, 2024. So, I woke up at 7 AM ⏰ today, did some morning walk, yoga for 30 mins. Went to temple & then started the routine.

Today's Plan - đź’Ż

  • June 22 (Sat): Study linked lists, practice easy problems. (4 hours)

Watch the videos for linked list from Udemy Course.
Master the Coding Interview: Data Structures + Algorithms

✅ What is linked list? ⛓️

  • A linked list is a linear data structure that stores a collection of data elements dynamically.
  • Nodes represent those data elements, and links or pointers connect each node.
  • Each node consists of two fields, the information stored in a linked list and a pointer that stores the address of its next node.
  • The last node contains null in its second field because it will point to no node.
  • A linked list can grow and shrink its size, as per the requirement.
  • It does not waste memory space.

âś… The linked list mainly has three types, they are:

  1. Singly Linked List
  2. Doubly Linked List
  3. Circular Linked List

Image description

✅ Essential Operation on Linked Lists 🚥

  1. Traversing: To traverse all nodes one by one.
  2. Insertion: To insert new nodes at specific positions.
  3. Deletion: To delete nodes from specific positions.
  4. Searching: To search for an element from the linked list.

âś… Application of a Linked List

  • A linked list is used to implement stacks and queues.
  • A linked list also helps to implement an adjacency matrix graph.
  • It is used for the dynamic memory location.
  • The linked list makes it easy to deal with the addition and multiplication of polynomial operations.
  • Implementing a hash table, each bucket of the hash table itself behaves as a linked list.
  • It is used in a functionality known as undo in Photoshop and Word.
  • With that, you have reached the end of this tutorial on Linked Lists.

✅ Some leet code question which I solved today 👨‍💻

  1. linked-list-cycle
  2. Merge Two Sorted Lists
  3. Remove Duplicates from Sorted List
  4. Intersection of Two Linked Lists

All the above leet code questions are solved from my end, I hope you will also try the same. If you can't solve it no problem. Learn it and try again. Never give up.

Always remember, your career is a marathon, not a sprint.

âś… Checkout some of my post

Frontend Interview Preparation

MAANG Interview Preparation Day 1 - The Plan


This content originally appeared on DEV Community and was authored by Nishant Singh


Print Share Comment Cite Upload Translate Updates
APA

Nishant Singh | Sciencx (2024-06-22T13:13:13+00:00) MAANG Interview Preparation Day 2 – Linked List. Retrieved from https://www.scien.cx/2024/06/22/maang-interview-preparation-day-2-linked-list/

MLA
" » MAANG Interview Preparation Day 2 – Linked List." Nishant Singh | Sciencx - Saturday June 22, 2024, https://www.scien.cx/2024/06/22/maang-interview-preparation-day-2-linked-list/
HARVARD
Nishant Singh | Sciencx Saturday June 22, 2024 » MAANG Interview Preparation Day 2 – Linked List., viewed ,<https://www.scien.cx/2024/06/22/maang-interview-preparation-day-2-linked-list/>
VANCOUVER
Nishant Singh | Sciencx - » MAANG Interview Preparation Day 2 – Linked List. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/06/22/maang-interview-preparation-day-2-linked-list/
CHICAGO
" » MAANG Interview Preparation Day 2 – Linked List." Nishant Singh | Sciencx - Accessed . https://www.scien.cx/2024/06/22/maang-interview-preparation-day-2-linked-list/
IEEE
" » MAANG Interview Preparation Day 2 – Linked List." Nishant Singh | Sciencx [Online]. Available: https://www.scien.cx/2024/06/22/maang-interview-preparation-day-2-linked-list/. [Accessed: ]
rf:citation
» MAANG Interview Preparation Day 2 – Linked List | Nishant Singh | Sciencx | https://www.scien.cx/2024/06/22/maang-interview-preparation-day-2-linked-list/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.