How to find the time complexity of any code?

how to find the time complexity of any program ? how to get to know that how much complex or how much time will it take to execute? will be less time consuming or will it not give any error to my code??

@Anku47,
Isn’t there any lecture on complexity in your course?

it’s there but i want to learn that how to find complexity of a random code?

@Anku47,
There’s no general theory for that I mean there is, but it’s too theoretical for daily usage aka useless for coders mostly, mostly it’s a case specific thing. loops gives a linear factor, nested loops multiply, etc etc… You will know it intuitively as you gain experience in coding.

so what is important for interview? on which part should i focus to crack interview? i mean what do they ask mostly? from which part? as i am non cs background student.

@Anku47,
That depends on company to company. Which year are you in…?

i passed my b.tech in civil engineering in 2014 but now i feel that i don’t want to pursue my career in civil. so what should i do so that i get job before the end of this year? i have basic knowledge of coding because i have done diploma of three years in computer engineering and i m keen interested in web development and i want to get maximum salary package so what should i do? what steps should i follow? how to prepare so that i get selected in FAANG companies?

Hey,

You can ask all your such questions and talk about the possibilities for your career, on the chat option on bottom right corner of your online.codingblocks.com website.