Without using library functions


#1

In real life interviews/coding tests, are we allowed to use inbuilt functions in this type of question? In this question, if we use all the required functions, it will be merely a 3/4 line code and if we don’t, it will turn out to be a tedious one. Please do share your thoughts regarding this.


#2

You can’t use inbuilt functions .


#3

you should probably use inbuilt function to parse the string to int. other than that it should be 3-5 lines using bitshift