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

Recursion and stack #159

Merged
merged 24 commits into from
Oct 5, 2021
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
04b8cb2
Translate a part of article
mahdiHash Sep 28, 2021
ed3051b
Translate a part of article
mahdiHash Sep 29, 2021
515ad84
Merge branch 'javascript-tutorial:master' into master
mahdiHash Sep 30, 2021
5fcdd34
Translate a part of article
mahdiHash Sep 30, 2021
17cc7e1
Translate a part of article
mahdiHash Oct 1, 2021
923fc54
Translate a part of article
mahdiHash Oct 1, 2021
5dfd251
Translate a part of article
mahdiHash Oct 2, 2021
b04627a
Translate a part of article
mahdiHash Oct 3, 2021
dccf17d
Translate article
mahdiHash Oct 3, 2021
a0a8673
Translate task of "sum-to"
mahdiHash Oct 4, 2021
43f6242
Translate solution of "sum-to"
mahdiHash Oct 4, 2021
e4568a1
Translate task of "factorial"
mahdiHash Oct 4, 2021
d62d0dc
Translate solution of "factorial"
mahdiHash Oct 4, 2021
a58435c
Translate task of "fibonacci-numbers"
mahdiHash Oct 4, 2021
a453039
Translate solution of "fibonacci-numbers"
mahdiHash Oct 4, 2021
7e5b852
Translate task of "output-single-linked-list"
mahdiHash Oct 4, 2021
a67bd44
Translate solution of "output-single-linked-list"
mahdiHash Oct 4, 2021
aa26bd7
Translate task of "output-single-linked-list-reverse"
mahdiHash Oct 4, 2021
4978f4f
Translate solution of "output-single-linked-list-reverse"
mahdiHash Oct 4, 2021
c4fc445
Apply suggestions from code review
mahdiHash Oct 4, 2021
2ffc9af
Update 1-js/06-advanced-functions/01-recursion/article.md
mahdiHash Oct 4, 2021
c084a25
Change "stack" to "پشته"
mahdiHash Oct 4, 2021
0fe37e7
Change "stack" to "پشته"
mahdiHash Oct 4, 2021
fafd50f
Change "stack" to "پشته"
mahdiHash Oct 4, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Translate task of "output-single-linked-list"
  • Loading branch information
mahdiHash committed Oct 4, 2021
commit 7e5b852e6342e0422185fd6fb59db5b8220db8c1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ importance: 5

# Output a single-linked list

Let's say we have a single-linked list (as described in the chapter <info:recursion>):
بیایید فرض کنیم یک لیست پیوندی داریم (همانطور که در فصل <info:recursion> توضیح داده شد):

```js
let list = {
Expand All @@ -22,8 +22,8 @@ let list = {
};
```

Write a function `printList(list)` that outputs list items one-by-one.
تابع `printList(list)` را بنویسید که المان‌های لیست را یکی یکی نمایش دهد.

Make two variants of the solution: using a loop and using recursion.
دو نوع راه‌حل بنویسید: با استفاده از حلقه و با استفاده از بازگشت.

What's better: with recursion or without it?
کدام راه بهتر است: با بازگشت یا بدون آن؟