Because the minimum negative value is -6. And the remaining negative values are greater than -6(like -4). So, if we add 6 to each one of them, then all the values will be positive.( Ex- -6+6=0, -4+6=2). @@justworkfine321
@ankithreddyadudodla76733 жыл бұрын
Waiting for more!!!
@munishkumar60223 жыл бұрын
🔥🔥 thnx sir
@araragikoyomi71863 жыл бұрын
Maps always come in handy in cp
@lakshsinghania Жыл бұрын
bro, ur rating on cf ?
@araragikoyomi7186 Жыл бұрын
@@lakshsinghania 1563
@lakshsinghania Жыл бұрын
@@araragikoyomi7186 cool cool
@s.aravindh62273 жыл бұрын
Nice video bro 👍👍
@ritukalpa_gogoi3 жыл бұрын
🙌🙌
@bhavyamathur2113 жыл бұрын
Well adding a positive of the minimum number is a bad idea. You can design a hash function instead or use a previously defined constant time hash function.
@manishkumarmahato24812 жыл бұрын
🔥
@kamleshjoshi29493 жыл бұрын
Hey @luv bro can you make a video and hands on for maps..plz beginners need it!!
@iamluv3 жыл бұрын
tomorrow i am posting it. as part of my competitive programming course its the next thing in the course. Course playlist link is in description
@narayanipandey4319 Жыл бұрын
Aur agar no. ki range (-N/2) to +(N/2) ho where N is maximum limit storage of int data type, tb fir kaise hashing karenge
@GANESHSINGH-oe2wy3 жыл бұрын
🙏🏻 🙏🏻Sir, aap padhate waqt highlight krne ke liye konsa softwate use krte ho (jo laser jaisa dikhta hai phir apne aap gayab ho jata hai) 🙏🏻🙏🏻
@anjalipatel37863 жыл бұрын
Why we have to add only 6?
@mobtricks2573 жыл бұрын
Brother c+ par bhi bana video full cross
@iamluv3 жыл бұрын
Bhai bana hua hai.. course ko jo link diya hai usme phle10-11 videos pura c++ pe hi hai.
@Sarkar.editsz2 жыл бұрын
Waah
@dattawarade2 жыл бұрын
Negetive number ko absolute value directly concert nahi kr sakte kya.
@mohan_792 Жыл бұрын
nhi bro, agar voh positive number bhi already array mai hua toh count galat ho jaayega.
@Live-hh6li3 жыл бұрын
Crisp like papad
@sharansunil45893 жыл бұрын
How long will this course continue bro. By which episode will we have full expertise over CP
@iamluv3 жыл бұрын
Basics should be covered by around episode 50. i guess maybe, for advanced there is no end i feel, there are just so many topic i could discuss but i will see what i would discuss and what i wouldnt.
@darshantawte74353 жыл бұрын
you can't become an expert in CP until you solve problems that too in contest. There is no point in just learning and not solving problems.
@ru29792 жыл бұрын
ek inssaan ne pucha hai 😂 🤣😂 lit bhai
@himanshusahu32593 жыл бұрын
Bhai ek question hai Main difference between class template and function template????? Please ans🙏
@deepanshumishra45683 жыл бұрын
Template class me tum ek class k bahut saare member function ko implement krke use krte ho apne program me But ek template function me tum sirf ek hi function ko use kr sktey ho. Class ka main purpose hota h bahut saare functions ko group krna, isliye hum template class kya use krtey h Or template function ka use tb krtey h jb ek hi operation performe krna ho
@himanshusahu32593 жыл бұрын
@@deepanshumishra4568 Thanks bro
@omprasadrathod36003 жыл бұрын
What if our array element is like -14 then if we add 6 in this then index is -8 then how could be possible to store at this index🤔
@texz13593 жыл бұрын
I know I am late but if the lowest negative number is mentioned I mean if range of array is from -M to +N where m and n are any number then just add M to every element that is to be added to the array and when giving the answer just subtract it. cout
@adheeshpatairiya73533 жыл бұрын
how to hash when the values of array exceeds 1e5 ? as integer max can be up to 1e9. Any Optimized method?
@iamluv3 жыл бұрын
you have to use an implementation of a hash table, in c++ you can use maps or unordered maps