trekhleb / javascript-algorithms

📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings
MIT License
185.03k stars 29.84k forks source link

I added size func. for some data structures #1045

Open kerimsenturk5734 opened 1 year ago

kerimsenturk5734 commented 1 year ago

I realized that we cannot access size of some structurest directly like stack, queue. We were have to access size by other objects like linkedlist.toArray().size. That is why i added size func. inside linkedlist using toArray func and i called size func. of linkedlist inside other structures.(stack, queue, doublylindkedlist.) Now we can directly access size inside data structures like stack and queue.