Medium

You're implementing an auto-save feature for a document editor. During testing, you notice that the save function is being called too frequently during rapid typing. What's the best way to optimize this code?

Choose an option below