Тёмный

Sort an array of 0s 1s and 2s | Dutch National flag Algorithm | GeekForGeeks interview  

DSATelugu
Подписаться 1,5 тыс.
Просмотров 209
50% 1

Join our telegram group for daily assignments :
t.me/+oRkO0JQe...
sort an array of 0s 1s and 2s,
sort an array of 0s 1s and 2s in java,
sort an array of 0s 1s and 2s in python,
sort an array of 0s 1s and 2s geeksforgeeks,
sort an array of 0s 1s and 2s in c++,
sort an array of 0s 1s and 2s gfg,
sort an array of 0s 1s and 2s leetcode,
sort the array of 0s 1s and 2s,
sort the array of 0s 1s and 2s in java,
sort an array of 0s 1s and 2s java,
sort array of 0 1 2 java,
sort an array of 0s 1s and 2s python

Опубликовано:

 

16 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 12   
@bd1a0573
@bd1a0573 2 месяца назад
Super Brother. Meeru videos Post chestune Undandi.
@user-fl7cl1qy5d
@user-fl7cl1qy5d Месяц назад
Bro please continue this video's
@DSATelugu0321
@DSATelugu0321 Месяц назад
👍
@asusrog8238
@asusrog8238 2 месяца назад
###APPROACH 1: def sort_012(arr): count_0 = 0 count_1 = 0 count_2 = 0 # Count occurrences of 0s, 1s, and 2s for num in arr: if num == 0: count_0 += 1 elif num == 1: count_1 += 1 elif num == 2: count_2 += 1 # Reconstruct the array index = 0 # Place all 0s in the array for _ in range(count_0): arr[index] = 0 index += 1 # Place all 1s in the array for _ in range(count_1): arr[index] = 1 index += 1 # Place all 2s in the array for _ in range(count_2): arr[index] = 2 index += 1 return arr
@asusrog8238
@asusrog8238 2 месяца назад
ilanti DSA based topics ni telugu lo explain chesevaaru chala takkuva bro. Don't worry ,Future lo ni channel growth ekkadiko velthundi. Just upload your content consistently. kuncham last lo code raasi kuda pai-paina explain chey bro
@DSATelugu0321
@DSATelugu0321 2 месяца назад
Ok bro Thank you for your support ☺👍
@shaikhanuman8012
@shaikhanuman8012 2 месяца назад
​@@DSATelugu0321good explanation keep it up
@dummarajesh9763
@dummarajesh9763 2 месяца назад
Thank you Anna
@DSATelugu0321
@DSATelugu0321 2 месяца назад
You're welcome 🙂
@techdevilsgaming1574
@techdevilsgaming1574 28 дней назад
Bro n-1 value 2 vundi mid value 2 vundi swap chayadaniki radu kada bro
@asusrog8238
@asusrog8238 2 месяца назад
###APPROACH 2: DUTCH NATIONAL FLAG ALGORITHM def sort_012(arr): low = 0 mid = 0 high = len(arr) - 1 while mid
@DSATelugu0321
@DSATelugu0321 2 месяца назад
Thank you for sharing the python code 👏👏 . This will be helpful for our subscribers 👍
Далее
For my passenger princess ❤️ #tiktok #elsarca
00:24