← Questions
Four short array and string exercises
0
I was asked this
No reports yet. Sign in to say where you were asked it.
Four quick problems in one round:
- Return the difference between the number of uppercase and lowercase letters in a string.
- Repeatedly subtract from the non-zero elements of an array, scanning from the left, until every element is zero, stopping a pass when you reach a value strictly smaller than the current one; report what the problem asks for at the end.
- Find the fewest unit increments that make an array either non-decreasing or non-increasing.
- Simulate a phone battery that charges and drains in cycles and answer the question about its charge.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
