NEWBIE here!

can anybody help me that when to use only int and when to use long int or long long int?also i am studying few stl so what are some resoruces to study stl from basic…like if i am studying map then resources through which i can study map from basics like input etc etc…(please give suggestions except paid courses if possible)

Always use Long long int. Then you don’t have to worry about overflow conditions.
For STL watch Rachit Jain’s STL video on youtube. Moreover grip over STL will come by practise. Practise DSA Stl series on Codechef

but this is not the solution.

When the constraints are in range of 10^9 then use int and after that use long long int.

For stl study from geeks for geeks.

To clear all the basic complete 5 star in c++ on hacker rank

I personally never faced any issues due to long long. It always works.

1 Like

Use these excellent articles for STL Preparation


This is a playlist you can use .
best channel for learning for newbies

strong text

You can view this video for a great experience sharing

U may sometime face problems in DP problems where int will work fine and unnecessary long long will result in TLE or MLE so it’s always recommended to not unnecessarily use long long in DP problems.

1 Like

@subbu988 that is what i want to say.
why to use extra memory space when not needed.
Thanks @maskmanlucifer

cause you have practised little my friend

Don’t go on stars. I don’t like giving contests here. I am active on cf more than 1.5 years and have solved over 800 problems. I guess it is not little🙂

1 Like