I had 1 hour 45 minutes and I was totally blank for B.Attempted and got WA on test 2.😶 BTW thank you bhaiya 👍🏻
@dhayalanm22063 жыл бұрын
Brother can u explain the intuition in taking that i, j like that n-200.. Can't understands.. Kindly reply brother
@DouglasDaMan3 жыл бұрын
Cant wait to see you reach master, good luck!
@shadabkouser24463 жыл бұрын
Man...u've reached candidate master pretty fast...keep up the good work👍
@PriyanshAgarwal3 жыл бұрын
By the way I reached CM in September last year. Hoping to reach Master by this September xD.
@shadabkouser24463 жыл бұрын
@@PriyanshAgarwal even early August 12 2020...😂👍
@GGxEpsilon3 жыл бұрын
@@PriyanshAgarwal same 😂
@movocode3 жыл бұрын
He has worked hard thats why
@yashpriyadeepkatta88233 жыл бұрын
@20:29, you said that "k times a[i]", why were we able to neglect a[j], can you please explain this point? like why was it not k times a[i] * a[j]?
@PriyanshAgarwal3 жыл бұрын
I was looking for the worst case in k * (a[i] | a[j]). So, if a[i] has all bits set in it and it is the maximum number in the array, then taking a[j] and not taking a[j] would mean the same as when you will take an OR you will see that there is no change as the number already has all bits set.
@yashpriyadeepkatta88233 жыл бұрын
@@PriyanshAgarwal Actually i am having hard time understanding these time of concept is it due to lack of practice or i should learn some extra concept?
@niharjani96113 жыл бұрын
Bhaiya can you give a basic c++ code template including all necessary macros , typedef , and fastio statement? If possible
@PriyanshAgarwal3 жыл бұрын
Sure, check out my Github repo of CP templates. github.com/Priyansh19077/CP-Templates For particularly the template you can use this: github.com/Priyansh19077/CP-Templates/blob/master/Template.cpp I am pretty sure I am going to get plagiarized someday xD. So many people are using this very same template now.
@shahriarhabib64523 жыл бұрын
bro,which theme do u use in sublime?
@PriyanshAgarwal3 жыл бұрын
Brogrammer.
@prathamchitransh53383 жыл бұрын
Coding se jyada typing acchi lg rhi h😅
@gentleman46153 жыл бұрын
How can i talk to you directly and privately?
@PriyanshAgarwal3 жыл бұрын
Discord is the place. For 1 on 1 counseling you can take up my commission on memboro memboro.com/priyansh31dec
@orzAR263 жыл бұрын
5:10 i don't know,how many girls would have fallen for this expression!!😂😂😂😂
@MilindGupta3 жыл бұрын
Except u none
@anshshah49273 жыл бұрын
B 1500 -1600 today
@108_adityakumar63 жыл бұрын
Yes definitely
@mloneuskk3 жыл бұрын
1800 lol
@vikaspandey83543 жыл бұрын
👍
@ultronxd28603 жыл бұрын
Please make a video on time complexity ...... please 🥺
@PriyanshAgarwal3 жыл бұрын
I already have a tutorial on time and space complexity on this channel. Please look for a video titled Time Complexity Foobar Beginner class.
@ultronxd28603 жыл бұрын
@@PriyanshAgarwal Thank you i'll check
@GGxEpsilon3 жыл бұрын
Problem D was so guessy... Either you get it or you dont
@PriyanshAgarwal3 жыл бұрын
Totally agree. I figued it out from the sample test cases. The idea was cool actually.
@jethalalnhk24093 жыл бұрын
At 10:58 you say If I take OR of zero with anything it will be zero. Is it correct
@PriyanshAgarwal3 жыл бұрын
I was assuming OR to be AND just after reading the problem 😂. Some time later you will see me realise that in the video.
@Srlsped3 жыл бұрын
What is the name of this ide
@noobie67843 жыл бұрын
Stream is nice but please remove the keyboard frontcam.
@PriyanshAgarwal3 жыл бұрын
I added it only because a lot of people wanted to see that 😅
Well, you can't submit a normal O(n^2) solution. You can consider the last 100-1000 elements and do an O(n^2) in that many elements only.
@rishitiwari62003 жыл бұрын
@@PriyanshAgarwal how u thought of last 100-1000 I was just thinking of all alternate got wa in pretest 2 and then taken n and n-1 th element but not running on some given tc
@PriyanshAgarwal3 жыл бұрын
@@rishitiwari6200 Just look at the first quantity: (i * j) if you pick the last 2 elements then you have n * (n - 1). Now, look at the second quantity k * (a[i] | a[j])... This value can be at max k * n = 100 * n = 100n. So, the minimum answer that you can have from the last 2 elements is n * (n - 1) - 100 n. Now, try to pick the elements n and (n - 2). Now, your best answer can be (n - 2) * n. Clearly, this number will be much smaller than the 1st number for n >= 1000. So, you only have to check for n