Skip to content

Commit

Permalink
solved: leetcode #1929, neetcode challenge -@iamserda
Browse files Browse the repository at this point in the history
  • Loading branch information
iamserda committed Jan 22, 2025
1 parent 8c29171 commit de36e7c
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
def concate_list(nums: list[int]) -> list[int]:
if nums:
return [*nums, *nums]


assert concate_list([1, 2, 3]) == [1, 2, 3, 1, 2, 3]
assert concate_list([1, 3]) == [1, 3, 1, 3]
assert concate_list([1]) != [1, 2]

0 comments on commit de36e7c

Please sign in to comment.