PrepBytes Interview Preparation Marathon - Searching+ Sorting | Aman and Shopping | PrepShopping

preview_player
Показать описание
Interview Preparation Marathon - Recursion
Problem Name : Mike and Binary Number
Problem ID: BINARYNUM

Pre-requisite - Sorting , Logic Building

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

This can even be done without using frequency array by just checking if current element==next element then we don't consider it and for last element of array we consider it without checking above condition.

This saves space of frequency array

tejaswigutta
Автор

Can you plz elaborate the working of freq[arr[i]]==0??
how will this work ??

bhavyavijay