https://github.com/abshar777/dsa-1
https://github.com/abshar777/dsa-1
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/abshar777/dsa-1
- Owner: Abshar777
- Created: 2024-04-05T05:16:49.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-05T09:43:33.000Z (over 2 years ago)
- Last Synced: 2025-12-27T17:43:51.876Z (7 months ago)
- Language: JavaScript
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
first weeek of the dsa
1) stack
• ithu lifo principle wechittu annu ithu work cheyyunnathu
• ennu vech last in firts out
• oru plate trey polle annu ithu last kazhukhi vech plate ayirikkum first idukke athu poolle
• stack is abstartct data type , it is defined by its behavior rarther than mathematical modal
• ithu support cheyyuunna randu main oprationukhal
:- push , satha arrayille push thenmne athinte lastillekku elamnetinne cherkkke
:- pop , ithu arrayille pop thenne last ille elem remove cheyythu kallayum,ennu vecha last kazhukhi vech plate first idukkum ennu
stack usage:- browser history tracking
• browser go back and go forword button
• undo oparation in typing
• Call satck in js riuntime
2) que
:- ithu satha real life que pollle thenne ennu , ithu principle first in first out (fifio)
• first elemnt inserted to first athu thenne ayyiorikkukm remive avukha
• ithu normal lifillu train stationillu que nilllkkunnna polle thenne annu
• last varunnna quevillekku verunnavar add avvunnathu que vinte lastill ayirkkum ennu vecha (rear/tail)illlkku ,ennittu quevilll ninnu leave avvunnathu athinte thudakkathillu ninnu ayiirkkum (front/head)
• ithum oru abstract data type annu rather then mathametical modal
• ithillu main ayittu nadakkunna rtandu oprations annu
:- enqueue,ithu athintee lastillkku ennnu vecha reat/taillkkku elem add cheyyum
:- dequeue :- ithu firstilllu ninnu elamnt remove cheyyum (heqadillu)
quea usage:- printers ithu use cheyyunnathu multiple print cheyynnell
:- cpu task schedul cheyyunnathu
:- callBack que in js
methods:- enqueue(elem), add ane element to que
• dequeue():- remove the oldest elem in que
• peek():- get value of the elem at fornt of the que without remove
• isEmpty():- check que is empty
• size , get length of the que
• print() , ellla elam kannikke
3) circular que
:- ithu fixed size quew annu
• single block memmory use mathre ullo
• first elem eppoyum last eleminnettu connnect annu
• this also reffer also circular baffuer or ring buffer ennum ithu arriyapeddum
• ithu fifo principle annu follow cheyynnathu
• ithu supportv cheyunna main randu opertions annu
• enque and deque
• usage:- clcok
• streaming data yillu budfffer illu okke
• trafic lights
4) linked List
:- ithu oru linear ds annu sereies of connected nodesinteee
• each node consiist of data value and pointer to next node
• benifit :- easly inserted at array mothathillu arrayee relocate cheytheyoo reorganize cheyyethyo cheyyam
• dropback :- random acces of the elemnet is availeble an element has linear time complatxity
• oprations:- insertion, deleation,search
• usage:- stack and que are applications of linked list
• image viewer