Рет қаралды 5,149
This video explains the counting sort algorithm used to get an array's elements sorted. This algorithm works best for a large number of inputs having a small range of data. We can sort an array in increasing, decreasing, non-decreasing and non-increasing orders. This video is from an interview dose live session. The counting sort algorithm depends on the input's nature and has the best-case and worst-case time complexity of O(N) and O(N+Range).
If the range of data, that is difference between minimum and maximum, is low then the time complexity is linear O(N) with the same space complexity.
======================================PLEASE DONATE=============================
🧡 SUPPORT OUR WORK: / techdose
💚 UPI-ID: surya.kahar@ybl
💞JOIN Membership: / @techdose4u
==============================================================================
INSTAGRAM : / surya.pratap.k
LinkedIn: / surya-pratap-kahar-47b...
WEBSITE: techdose.co.in/
TELEGRAM Channel LINK: t.me/codewithTECHDOSE
TELEGRAM Group LINK: t.me/joinchat/SRVOIxWR4sRIVv5...
=======================================================================
USEFUL LINKS:
🟠Must do TIPS to ACE Virtual Interview: • 🔴Must do Tips to ACE y...
🟢Best strategy to excel in your coding interview: • 🔴Best strategy to exce...
🟡Get your dream job in 1 month: • 🔴Get your dream job in...
🔵How to crack dream job in just 2 months: • How to crack dream job...
🟣7 Days DSA plan: techdose.co.in/7-days-dsa-che...