Skip to content

Instantly share code, notes, and snippets.

@yungyungGwon
Created September 30, 2021 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yungyungGwon/ddbb2a7b4834042e908b03b2101f317b to your computer and use it in GitHub Desktop.
Save yungyungGwon/ddbb2a7b4834042e908b03b2101f317b to your computer and use it in GitHub Desktop.
def solution(prices):
answer = [0 for _ in range(len(prices))]
for i in range(len(prices)):
for j in range(i + 1,len(prices)):
if prices[i] <= prices[j]:
answer[i] += 1
else:
answer[i] += 1
break
return answer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment