Celine Surai
Oct 1, 2021

after using abs I go ahead to do checks below:

if output >= 2** 31 -1 or output <= -2** 31:

return 0

elif n < 0:

return -1 * output

else:

return output

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Celine Surai
Celine Surai

Written by Celine Surai

Software engineer. I write about my journey, Machine Learning, Web application development and also Python!

Responses (1)

Write a response