Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4037 - IsPalindrome #29708

Open
437204933 opened this issue Aug 22, 2023 · 0 comments
Open

4037 - IsPalindrome #29708

437204933 opened this issue Aug 22, 2023 · 0 comments
Labels
4037 answer Share answers/solutions to a question en in English

Comments

@437204933
Copy link

// your answers

type IsPalindromeAry<Ary> = 
Ary extends unknown[] ?
Ary extends [] 
  ? true 
  : Ary['length'] extends 1 
    ? true 
    : Ary extends [infer Head, ...infer Mid, infer Last] ? Head extends Last ? IsPalindromeAry<Mid> : false : false: false
@437204933 437204933 added answer Share answers/solutions to a question en in English labels Aug 22, 2023
@github-actions github-actions bot added the 4037 label Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4037 answer Share answers/solutions to a question en in English
Projects
None yet
Development

No branches or pull requests

1 participant