Bigger Is Greater HackerRank Solution

  Рет қаралды 16,022

JAVAAID - Coding Interview Preparation

JAVAAID - Coding Interview Preparation

Күн бұрын

Пікірлер: 52
@JavaAidTutorials
@JavaAidTutorials 5 жыл бұрын
JAVAAID community: KZbin recently changed the way they monetize my content. My channel now needs 1,000 subscribers so it would be awesome if you could show your support by both watching my videos and subscribing to my channel if you haven’t already done so. Monetizing my videos allows me to invest back into the channel with new equipment so a small gesture from you goes a huge way for me. Many thanks for your support!
@smahidharreddy
@smahidharreddy 5 жыл бұрын
Hi Kanahaiya, Thanks for the video. your solution is good and pretty simple to understand. Could you also make video on Queens Attack II.
@JavaAidTutorials
@JavaAidTutorials 5 жыл бұрын
​@@smahidharreddy Thanks for your compliment. Will try to make a tutorial on this on future if possible. It takes a lot of effort and time to make the good content and after that, very fewer people will watch then it does not motivate the creator at all. so currently I am focusing on the questions which most of the people tried but did not able to solve due to the right algorithm or approach. If there are too many people who want the solution for Queen attack problem will definitely make a video tutorial on this very soon. but if you need help to solve this, I can.
@navinchainani4721
@navinchainani4721 4 жыл бұрын
First i don't understand programming i finds it too difficult then i started coding from u KZbin channel after that i understand coding very nicely
@JavaAidTutorials
@JavaAidTutorials 4 жыл бұрын
thanks for the such a nice compliment.🙂 I am glad, you are learning something from our channel.
@GG-sw9vm
@GG-sw9vm Жыл бұрын
Does this work with "dkhc", with the logic, it will be d k h c, since d < k, we swap out c which is the smallest character to the right, now it becomes c k h d, after sorting c d h k which is wrong.
@yashsalvi5043
@yashsalvi5043 3 жыл бұрын
How do you come up with such logics bro ? Legit 🐐
@abhinashbihari2881
@abhinashbihari2881 4 жыл бұрын
We can use next_permutation(s.begin,s.end) to get next lexicographical greater string
@Mike-mw1fu
@Mike-mw1fu 5 жыл бұрын
Thank for helping me in optimizing code
@JavaAidTutorials
@JavaAidTutorials 5 жыл бұрын
Most welcome.
@ashutoshaswal
@ashutoshaswal 5 жыл бұрын
From your reply on my solution! Thanks for helping me in optimizing the code!
@JavaAidTutorials
@JavaAidTutorials 5 жыл бұрын
most welcome..:)
@rajasinghrajpoot8626
@rajasinghrajpoot8626 2 жыл бұрын
thank u very much brother..
@satyasantosh3143
@satyasantosh3143 4 жыл бұрын
Very good explanation!
@JavaAidTutorials
@JavaAidTutorials 4 жыл бұрын
Glad it was helpful!
@susritipal3747
@susritipal3747 4 жыл бұрын
Sir why you take endindex = n-1, extend- -, In the loop please explain
@arunkumarvaithiyanathan9808
@arunkumarvaithiyanathan9808 3 жыл бұрын
Please Explain Line 32: int firstSmallChar=charArray[endindex-1] why should we convert char to int ? Instead of do like Line 32: int firstSmallChar=endindex-1; Line 37: In 'if' condition (charArray[startindex]>charArray[firstSmallChar]) Thanks in Advance!!
@navinchainani4721
@navinchainani4721 4 жыл бұрын
Bro u are best KZbinr u are making future of ours keep doing bro
@JavaAidTutorials
@JavaAidTutorials 4 жыл бұрын
thanks. just trying to convey my knowledge in a best possible ways.
@adarshjaiswal7334
@adarshjaiswal7334 4 жыл бұрын
I have started loving your vedios and parallelly the Hackerrank. But I was having a doubt here line37 :- Is it necessary to check charArray[startIndex]> firstSmallChar , bcz in the starting loop itself we have selected "d" which is smaller than all other so obviously value of charArray[startIndex] will be always greater than "d". Please let me understand if I misunderstood something.
@JavaAidTutorials
@JavaAidTutorials 4 жыл бұрын
Could you please mentioned the time as well , so that i can go and recall it.
@reevarastogi6224
@reevarastogi6224 3 жыл бұрын
very nice explaination!!
@kratikavarshney1106
@kratikavarshney1106 5 жыл бұрын
Thanks. Very clear
@JavaAidTutorials
@JavaAidTutorials 5 жыл бұрын
thanks for you feedback @Kratika.
@codeminatiinterviewcode6459
@codeminatiinterviewcode6459 4 жыл бұрын
I was doing the same thing but just using an extra string for return and hence HRank was giving Segmentation Fault... And I wasted 2 Hrs. in Detecting Error of Memory overload... I hope this helps... :)
@sagarock1012
@sagarock1012 4 жыл бұрын
Hey! I didn't get the question , how is "abcd" > "abdc" Thank you
@JavaAidTutorials
@JavaAidTutorials 4 жыл бұрын
you have to consider lexicographical order (alphabetical order).that's why abcd > abdc because abcd comes before abdc (if you look into dictionary)
@sandrakonotey4570
@sandrakonotey4570 3 жыл бұрын
@@JavaAidTutorials "abcd" < "abdc"(abcd is less than abdc) not "abcd" > "abdc"
@anuragsekhri2315
@anuragsekhri2315 5 жыл бұрын
well explained
@JavaAidTutorials
@JavaAidTutorials 5 жыл бұрын
thank you..:)
@tanmaysinghal8370
@tanmaysinghal8370 4 жыл бұрын
Bro please make the video solution for all the solution that is in there in your GitHub.
@JavaAidTutorials
@JavaAidTutorials 4 жыл бұрын
Sure, we are working on it. 👍
@linuxtubers7313
@linuxtubers7313 4 жыл бұрын
Thanks
@JavaAidTutorials
@JavaAidTutorials 4 жыл бұрын
Welcome
@ankitkumar-ql4yh
@ankitkumar-ql4yh 3 жыл бұрын
hey i followed your video and did the same but still my half test cases are getting time out..i have commented my code in the discussion section in your comment thread ..please check it and tell me what im doing wrong
@rogercute2002
@rogercute2002 3 жыл бұрын
Why not "ecdfhi" is the answer?
@TheAriaFans
@TheAriaFans 29 күн бұрын
Subtitles pls i really need it.
@LetszGoo
@LetszGoo 3 жыл бұрын
What is the complexity of this
@AnkitKumar5
@AnkitKumar5 4 жыл бұрын
This is O(n^2) solution. Is there a better solution?
@JavaAidTutorials
@JavaAidTutorials 4 жыл бұрын
The above explained solution is having O(N) complexity 😊.
@sterl1789
@sterl1789 5 жыл бұрын
this solution is nlogn
@JavaAidTutorials
@JavaAidTutorials 5 жыл бұрын
Hi Sterling Quinn, this is the catch here, it looks that its nlogn but it's not because sorting a string array will take O(nlogn) time but sorting a char array will take only O(n) time, you can apply counting sort for that.
@sterl1789
@sterl1789 5 жыл бұрын
JAVAAID - Coding Interview Preparation oh cool that makes sense thank you!
@JavaAidTutorials
@JavaAidTutorials 5 жыл бұрын
welcome. :) if you find this channel useful , please share with your friends.
@jhonhernandez9210
@jhonhernandez9210 9 ай бұрын
I couldn't understand much cause of tha english with indian accent
@kingnani1557
@kingnani1557 5 жыл бұрын
Explain the code more clearly .. you're explaining the code very fast
@JavaAidTutorials
@JavaAidTutorials 5 жыл бұрын
Thanks for your feedback @KING NANI , will try the same. Keep leaning , keep sharing..!!😊
@groot4957
@groot4957 2 жыл бұрын
Thanks
@Pr3kashSingh
@Pr3kashSingh 2 жыл бұрын
Thanks
Minimum Distances HackerRank Solution
17:53
JAVAAID - Coding Interview Preparation
Рет қаралды 19 М.
How To Solve Counting Valleys HackerRank Problem
17:00
JAVAAID - Coding Interview Preparation
Рет қаралды 45 М.
小丑揭穿坏人的阴谋 #小丑 #天使 #shorts
00:35
好人小丑
Рет қаралды 44 МЛН
Wait… Maxim, did you just eat 8 BURGERS?!🍔😳| Free Fire Official
00:13
Garena Free Fire Global
Рет қаралды 9 МЛН
1, 2, 3, 4, 5, 6, 7, 8, 9 🙈⚽️
00:46
Celine Dept
Рет қаралды 74 МЛН
Ice Cream or Surprise Trip Around the World?
00:31
Hungry FAM
Рет қаралды 4,8 МЛН
Jumping On The Clouds HackerRank Solution [One Liner Solution]
26:26
JAVAAID - Coding Interview Preparation
Рет қаралды 52 М.
Arrays Left Rotation HackerRank Solution
11:52
JAVAAID - Coding Interview Preparation
Рет қаралды 46 М.
How To Solve Number Line Jumps | Kangaroo | HackerRank Problem [ Using Formula ]
13:09
JAVAAID - Coding Interview Preparation
Рет қаралды 33 М.
How To Solve HackerRank Drawing Book Problem
11:00
JAVAAID - Coding Interview Preparation
Рет қаралды 17 М.
New Year Chaos HackerRank Solution
23:56
JAVAAID - Coding Interview Preparation
Рет қаралды 52 М.
Easy Google Coding Interview With Ben Awad
28:00
Clément Mihailescu
Рет қаралды 1 МЛН
LeetCode was HARD until I Learned these 15 Patterns
13:00
Ashish Pratap Singh
Рет қаралды 541 М.
HackerRank Jumping on the Clouds Solution Explained - Java
3:51
小丑揭穿坏人的阴谋 #小丑 #天使 #shorts
00:35
好人小丑
Рет қаралды 44 МЛН