JS 28/100: Sort() Method in JavaScript – Explained in 60 Sec! Detailed Working 🔥 #coding #shorts

preview_player
Показать описание
JS 28/100: Sort() Method in JavaScript – Explained in 60 Sec! Detailed Working 🔥 #coding #shorts

⭐ Tags

#programming #javascript #season2
Рекомендации по теме
Комментарии
Автор

Finally understand the working of sort Thank you bhaiya ❤

hilmand
Автор

New series also for typescript please 1to 100 new concept please

sumanshah
Автор

Time complexity is O(n^2). Can't we go merge sort in JS?

pradeepgaur
Автор

I was wondering although i didn't watch this short. Did js adopt the new pdqsort as their sorting algorithm ? Cause cpp and go did adopted it in their major last release !

Sky-fk
Автор

This is not correct.
Here’s how it works in popular engines:

1. V8 Engine (Chrome, Node.js, Edge)

TimSort (for arrays with more than 10 elements)

Insertion Sort (for small arrays, typically ≤ 10 elements)



2. SpiderMonkey (Firefox)

Merge Sort



3. JavaScriptCore (Safari)

Merge Sort.

You have given the example of bubble sort, which isn't good for its time complexity.

biswajitnath
Автор

This is bubble sort with worst time complexity

Mayank-qkui
welcome to shbcf.ru