I've noticed that in a lot of coding problems there is a need to compare x to x+1 in an array, although I've never found a good way to do it.
How can I do it? Is it even possible? Sorry if this seems like a noob question, I am not very good yet.
Here is what I usually try:
for x in range(len(nums)):
if nums[x] > nums[x+1 < len(nums)]:
count +=1