type-challenges-solutions icon indicating copy to clipboard operation
type-challenges-solutions copied to clipboard

type-challenges-solutions/en/medium-minusone

Open utterances-bot opened this issue 2 years ago • 4 comments

MinusOne

This project is aimed at helping you better understand how the type system works, writing your own utilities, or just having fun with the challenges.

https://ghaiklor.github.io/type-challenges-solutions/en/medium-minusone.html

utterances-bot avatar May 27 '22 01:05 utterances-bot

Instead of appending a single element to the tuple on each recursive call, we can append more on each recursive call, which results in fewer recursive calls and passes the test. Check my solution for details: https://github.com/type-challenges/type-challenges/issues/10727

cigui avatar May 27 '22 01:05 cigui

https://github.com/type-challenges/type-challenges/issues/18456#issue-1432554106 use Tail recursion

mefengl avatar Nov 07 '22 08:11 mefengl

I wrote a short and long versions of solutions for this challenge with more explanation: https://github.com/type-challenges/type-challenges/issues/19437

中文笔记:https://juejin.cn/post/7167664060547203108/

zhaoyao91 avatar Nov 18 '22 21:11 zhaoyao91

Came up with two solutions. One works up to 9999, the other works up to 9_007_199_254_740_992. https://github.com/type-challenges/type-challenges/issues/21030#issue-1509235310

gaac510 avatar Dec 23 '22 13:12 gaac510