They asked standard technical interview questions like write a function to convert string to number. They asked "why bloomberg?" a few times.
Anonymous
int sign=1; int result=0; for c in string s //Skip n leading white space if c==' ' continue; //Check sign else if c=='+' or c=='-' sign=(c=='+')?1:-1; //Check if valid char else if c is not digit return sign*result; //Check if overflow else int k=c-'0'; //convert char to int int temp=result*10+k; if (result>=INT_MAX/10 and k>=8) or (result!=(temp-k)/10) return (sign==1)?INT_MAX:INT_MIN result=temp return result
Check out your Company Bowl for anonymous work chats.