Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aa0f47e

Browse files
Linked list turkish readme (trekhleb#739)
* added README.tr-TR.md for linked-list * added gap * linked list description edited.
1 parent c1b2e89 commit aa0f47e

File tree

2 files changed

+160
-0
lines changed

2 files changed

+160
-0
lines changed

src/data-structures/linked-list/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ _Read this in other languages:_
77
[_Português_](README.pt-BR.md),
88
[_한국어_](README.ko-KR.md),
99
[_Español_](README.es-ES.md),
10+
[_Turkish_](README.tr-TR.md),
1011

1112
In computer science, a **linked list** is a linear collection
1213
of data elements, in which linear order is not given by
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
# Bağlantılı Liste
2+
3+
_Bunu diğer dillerde okuyun:_
4+
[_简体中文_](README.zh-CN.md),
5+
[_Русский_](README.ru-RU.md),
6+
[_日本語_](README.ja-JP.md),
7+
[_Português_](README.pt-BR.md),
8+
[_한국어_](README.ko-KR.md),
9+
[_Español_](README.es-ES.md),
10+
11+
Bilgisayar bilimlerinde, **Bağlantılı liste**, her biri hem gerçek verileri
12+
hem de listedeki bir sonraki düğümün bir bağlantısını içeren dinamik bir
13+
veri yapısıdır. Bu yapı, yineleme sırasında rastgele bir konumda
14+
öğeleri verimli bir şekilde eklemenize ve kaldırmanıza olanak tanır.
15+
Daha karmaşık seçenekler için, isteğe bağlı öğeleri verimli bir şekilde
16+
eklemek ve kaldırmak için ek bağlantılar içerir.
17+
18+
Bağlantılı listelerin bir dezavantajı, erişim süresinin doğrusal olmasıdır
19+
(ve ardışık düzene geçirilmesi zordur). Rastgele erişim gibi daha hızlı erişim
20+
mümkün değildir. Diziler, bağlantılı listelere kıyasla daha iyi önbellek konumuna sahiptir.
21+
22+
![Bağlantılı Liste](https://upload.wikimedia.org/wikipedia/commons/6/6d/Singly-linked-list.svg)
23+
24+
## Temel İşlemler için Sözde Kod
25+
26+
### Ekleme
27+
28+
```text
29+
Add(value)
30+
Pre: value is the value to add to the list
31+
Post: value has been placed at the tail of the list
32+
n ← node(value)
33+
if head = ø
34+
head ← n
35+
tail ← n
36+
else
37+
tail.next ← n
38+
tail ← n
39+
end if
40+
end Add
41+
```
42+
43+
```text
44+
Prepend(value)
45+
Pre: value is the value to add to the list
46+
Post: value has been placed at the head of the list
47+
n ← node(value)
48+
n.next ← head
49+
head ← n
50+
if tail = ø
51+
tail ← n
52+
end
53+
end Prepend
54+
```
55+
56+
### Arama
57+
58+
```text
59+
Contains(head, value)
60+
Pre: head is the head node in the list
61+
value is the value to search for
62+
Post: the item is either in the linked list, true; otherwise false
63+
n ← head
64+
while n != ø and n.value != value
65+
n ← n.next
66+
end while
67+
if n = ø
68+
return false
69+
end if
70+
return true
71+
end Contains
72+
```
73+
74+
### Silme
75+
76+
```text
77+
Remove(head, value)
78+
Pre: head is the head node in the list
79+
value is the value to remove from the list
80+
Post: value is removed from the list, true, otherwise false
81+
if head = ø
82+
return false
83+
end if
84+
n ← head
85+
if n.value = value
86+
if head = tail
87+
head ← ø
88+
tail ← ø
89+
else
90+
head ← head.next
91+
end if
92+
return true
93+
end if
94+
while n.next != ø and n.next.value != value
95+
n ← n.next
96+
end while
97+
if n.next != ø
98+
if n.next = tail
99+
tail ← n
100+
tail.next = null
101+
end if
102+
n.next ← n.next.next
103+
return true
104+
end if
105+
return false
106+
end Remove
107+
```
108+
109+
### Geçiş
110+
111+
```text
112+
Traverse(head)
113+
Pre: head is the head node in the list
114+
Post: the items in the list have been traversed
115+
n ← head
116+
while n != ø
117+
yield n.value
118+
n ← n.next
119+
end while
120+
end Traverse
121+
```
122+
123+
### Ters Geçiş
124+
125+
```text
126+
ReverseTraversal(head, tail)
127+
Pre: head and tail belong to the same list
128+
Post: the items in the list have been traversed in reverse order
129+
if tail != ø
130+
curr ← tail
131+
while curr != head
132+
prev ← head
133+
while prev.next != curr
134+
prev ← prev.next
135+
end while
136+
yield curr.value
137+
curr ← prev
138+
end while
139+
yield curr.value
140+
end if
141+
end ReverseTraversal
142+
```
143+
144+
## Karmaşıklıklar
145+
146+
### Zaman Karmaşıklığı
147+
148+
| Erişim | Arama | Ekleme | Silme |
149+
| :-------: | :-------: | :-------: | :-------: |
150+
| O(n) | O(n) | O(1) | O(n) |
151+
152+
### Uzay Karmaşıklığı
153+
154+
O(n)
155+
156+
## Referanslar
157+
158+
- [Wikipedia](https://en.wikipedia.org/wiki/Linked_list)
159+
- [YouTube](https://www.youtube.com/watch?v=njTh_OwMljA&index=2&t=1s&list=PLLXdhg_r2hKA7DPDsunoDZ-Z769jWn4R8)

0 commit comments

Comments
 (0)