Skip to content

Commit 3f508f7

Browse files
committed
10-6-24
1 parent 55e4120 commit 3f508f7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Jun-10-24.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
class Solution:
2+
def heightChecker(self, heights: List[int]) -> int:
3+
exp = sorted(heights)
4+
cnt = 0
5+
for i,x in enumerate(heights):
6+
if x!=exp[i]:
7+
cnt += 1
8+
return cnt

0 commit comments

Comments
 (0)