Real-life applications of Various Data Structures.
A thread👇
✨ STACK 1) UNDO option
2) Text editor, you push letter by letter to the stack so you erase back.
3) Recursion (in built stack)
✨QUEUE 1) Your browser deletes the history past one month.
2) All the pictures you delete from your phone will be stored in a queue, so that after sometimes front items can be popped out easily (permanently deleted)
3) Waiting list: Registration Requests are put in the queue.
✨LINKED-LIST 1) Browser's Next and Previous Button: a linked list of URLS
2) music player where you can play next or previous song. (Doubly linked list).
3) In ludo game, it had pass the turn to each player in circular fashion (circular linked list).
✨TREES 1) File system: Folders and subfolders (N-ary tree).
✨Coding interviews are majorly focused on data structures and algorithms but many times CS fundamental subjects also have been asked in interviews
Which are these topics ??????
👇Check out!!!
1️⃣Object-Oriented Programming
-->Object-oriented programming (OOP) is a computer programming model that organizes software design around data, or objects, rather than functions and logic
-->Insertion sort divides the given list into 2 parts.
-->The sorted part of the list at the beginning of the list and the unsorted part of the list at the end of the list.
-->It starts with the assumption that a list with a single element is always sorted.
-->So, insertion sort takes (length of list-1) iterations.
-->During each iteration, the first element of the unsorted list is picked and placed at the correct position of the sorted list. After all, iterations are done, the list gets sorted.
✨5 Algorithms you should learn if you are preparing for data structures and algorithm-based coding interviews
👇A Thread
1️⃣ kadane's algorithm
Problem statement-
Write an efficient algorithm to find the sum of contiguous subarray within a one-dimensional array of numbers that has the largest sum.