very well explained. Thanks, but still i have a confusion on why we have stored visited in arr[j] ??
@TechnosageLearning2 жыл бұрын
We have set freq[j] = visited....because we have already updated the count of that element(freq[j]) and we dont want to visit that element again Otherwise same element's frequency will be updated again and again and it wont provide the required result.
@kalpshah2070 Жыл бұрын
i have doubt related that you have print elements and their frequency for unique elements that not visited but what about that elements that stored in freq[j] how they print?
@rajrawat63762 жыл бұрын
How to do it if time complexity O(N) using brute force
@TechnosageLearning2 жыл бұрын
kzbin.info/www/bejne/pqu0p359mN-YaaM Checkout this video
@rajrawat63762 жыл бұрын
@@TechnosageLearning yeah i hve checked out this but the concept of has map isn't thought to us yet so i was asking if there was any other way
@mdaquibahmed35673 ай бұрын
Well explained maam
@politics2198 Жыл бұрын
very Awesome explaination.
@TechnosageLearning Жыл бұрын
Thank you!
@myviewyt33322 жыл бұрын
Well explained
@NirajKumar-n9f2d2 ай бұрын
public class count { public static void main(String[]args){ int []arr={1,2,3,4,2,2,3,1}; int []freq=new int[arr.length]; int visited = -1; for(int i=0;i
@basithnizam Жыл бұрын
what will happen if the give array has value of visited that is "-1"
@yashas13228 ай бұрын
it will not print(exclude)
@mdhasanuzzaman6963Ай бұрын
according to above logic it will getting the draw back
@samdarsh37952 жыл бұрын
Well explained mam 👍
@TechnosageLearning2 жыл бұрын
Thank you😊
@Riteshpc-c3x5 ай бұрын
thanks
@Caped_Crusader75 ай бұрын
why visited = -1?
@ImrojShaik-l4c11 ай бұрын
same as the code in the internet
@supriya_codes2 жыл бұрын
which screen recorder u r using??
@TechnosageLearning2 жыл бұрын
Default Mac screen capture tool
@naushadalam51292 жыл бұрын
8 2 0 1 1 1 0 3 1 ans=2 4 1 1 code output=2 4 1 0 how can i handle this case