Interview Question

Financial Applications Engineer Interview(Student Candidate)

How would you go about extracting individual digits from

  , and reversing the order of a 6 digit number in any programming language you are familiar with. Write out code on blank piece of paper.
Answer

Interview Answer

1 Answer

0

In Python,

1. num_list = [int(i) for i in list(str(num))]

2. int(str(num)[::-1])

Coders on Feb 26, 2013

Add Answers or Comments

To comment on this Question, Sign In with Facebook or Sign Up