Arrays in Python: Arbitrary Precision Increment

preview_player
Показать описание
In this video, we will be considering the following:

Given:
An array of non-negative digits that represent a decimal integer.

Problem:
Add one to the integer. Assume the solution still works even if implemented in a language with finite-precision arithmetic.

We will cover how to solve this problem algorithmically, and then code up a solution to this question in Python.

The software written in this video is available at:

Do you like the development environment I'm using in this video? It's a customized version of vim that's enhanced for Python development. If you want to see how I set up my vim, I have a series on this here:

If you've found this video helpful and want to stay up-to-date with the latest videos posted on this channel, please subscribe:
Рекомендации по теме
Комментарии
Автор

Hey, love your videos man, thank you for the effort you put into making them. I have a quick question on this one, how come when you did a[i - 1] += 1 you didnt check if a[i - 1] exists? what if you had an array of only one value [9]

JazzPants
Автор

can we just decleared array without importing array?

bishaladhikari
Автор

why you put ' ' infront of join?

jowadulkader
Автор

It seems there is an error at the end of your ppt:) The result should have been 1000, not 10000. Thanks! I enjoyed your video^^ bye 👋

__