No video

Frequency of each element in an integer array | Brute force | JAVA interview question

  Рет қаралды 27,860

Technosage

Technosage

2 жыл бұрын

Frequency of each element in an integer array using Brute force technique. O(n^2)
JAVA interview question
#JAVA

Пікірлер: 20
@myviewyt3332
@myviewyt3332 2 жыл бұрын
Well explained
@kalpshah2070
@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?
@politics2198
@politics2198 Жыл бұрын
very Awesome explaination.
@TechnosageLearning
@TechnosageLearning Жыл бұрын
Thank you!
@AkashYadav-tc2lo
@AkashYadav-tc2lo 2 жыл бұрын
very well explained. Thanks, but still i have a confusion on why we have stored visited in arr[j] ??
@TechnosageLearning
@TechnosageLearning 2 жыл бұрын
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.
@Riteshpc-c3x
@Riteshpc-c3x Ай бұрын
thanks
@samdarsh3795
@samdarsh3795 2 жыл бұрын
Well explained mam 👍
@TechnosageLearning
@TechnosageLearning 2 жыл бұрын
Thank you😊
@rajrawat6376
@rajrawat6376 2 жыл бұрын
How to do it if time complexity O(N) using brute force
@TechnosageLearning
@TechnosageLearning 2 жыл бұрын
kzbin.info/www/bejne/pqu0p359mN-YaaM Checkout this video
@rajrawat6376
@rajrawat6376 2 жыл бұрын
@@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
@basithnizam
@basithnizam Жыл бұрын
what will happen if the give array has value of visited that is "-1"
@yashas1322
@yashas1322 4 ай бұрын
it will not print(exclude)
@supriya_codes
@supriya_codes Жыл бұрын
which screen recorder u r using??
@TechnosageLearning
@TechnosageLearning Жыл бұрын
Default Mac screen capture tool
@Caped_Crusader7
@Caped_Crusader7 Ай бұрын
why visited = -1?
@user-bw7ew9lr5l
@user-bw7ew9lr5l 7 ай бұрын
same as the code in the internet
@naushadalam5129
@naushadalam5129 Жыл бұрын
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
@naushadalam5129
@naushadalam5129 Жыл бұрын
after sorting array
ОБЯЗАТЕЛЬНО СОВЕРШАЙТЕ ДОБРО!❤❤❤
00:45
Gym belt !! 😂😂  @kauermotta
00:10
Tibo InShape
Рет қаралды 18 МЛН
Они так быстро убрались!
01:00
Аришнев
Рет қаралды 2,4 МЛН
Rotate Array | Leetcode 189 | Top 150 interview question series
11:41
New AI ROBOT with 3 Brains SHOCKED Experts!
9:16
AI Revolution
Рет қаралды 14 М.
JPEG is Dying - And that's a bad thing
8:09
2kliksphilip
Рет қаралды 218 М.
Stop, Intel’s Already Dead! - AMD Ryzen 9600X & 9700X Review
13:47
Linus Tech Tips
Рет қаралды 1,1 МЛН
Find kth Largest and Smallest Element in Array Java (Hindi)
15:07
Smart Programming
Рет қаралды 89 М.
Remove Duplicate Elements from Unsorted Array - Java Code
13:50
Programming Tutorials
Рет қаралды 102 М.