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

feat: added Ukrainian translations for hash table #948

Merged
merged 2 commits into from
Oct 10, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Next Next commit
feat: added ukrainian translations for hash table
  • Loading branch information
alexanderkhivrych committed Oct 9, 2022
commit 0dabee5deed7d1b5f7591b9d2b0def9ebd1a864b
11 changes: 6 additions & 5 deletions src/data-structures/hash-table/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ _Read this in other languages:_
[_日本語_](README.ja-JP.md),
[_Français_](README.fr-FR.md),
[_Português_](README.pt-BR.md),
[_한국어_](README.ko-KR.md)
[_한국어_](README.ko-KR.md),
[_Українська_](README.uk-UA.md)

In computing, a **hash table** (hash map) is a data
structure which implements an *associative array*
abstract data type, a structure that can *map keys
to values*. A hash table uses a *hash function* to
structure which implements an _associative array_
abstract data type, a structure that can _map keys
to values_. A hash table uses a _hash function_ to
compute an index into an array of buckets or slots,
from which the desired value can be found

Expand All @@ -28,7 +29,7 @@ Hash collision resolved by separate chaining.

![Hash Collision](./images/collision-resolution.jpeg)

*Made with [okso.app](https://okso.app)*
_Made with [okso.app](https://okso.app)_

## References

Expand Down
29 changes: 29 additions & 0 deletions src/data-structures/hash-table/README.uk-UA.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Геш таблиця

**Геш таблиця** - структура даних, що реалізує абстрактний тип даних асоціативний масив, тобто. структура, яка
_зв'язує ключі зі значеннями_. Геш-таблиця використовує _геш-функцію_ для обчислення індексу в масиві, в якому може
бути знайдено бажане значення. Нижче представлена геш-таблиця, у якій ключем виступає ім'я людини, а значеннями
телефонні номери. Геш-функція перетворює ключ-ім'я на індекс масиву з телефонними номерами.

![Hash Table](./images/hash-table.jpeg)

В ідеалі геш-функція присвоюватиме елементу масиву унікальний ключ. Проте більшість реальних геш-таблиць
використовують недосконалі геш-функції. Це може призвести до ситуацій, коли геш-функція генерує однаковий індекс для
кількох ключів. Ці ситуації називаються колізіями і мають бути якось вирішені.

Існує два варіанти вирішення колізій - геш-таблиця з ланцюжками та з відкритою адресацією.

Метод ланцюжків передбачає зберігання значень, відповідних одному й тому індексу як зв'язкового списку(ланцюжка).

![Hash Collision](./images/collision-resolution.jpeg)

_Made with [okso.app](https://okso.app)_

Метод відкритої адресації поміщає значення, для якого отримано дублюючий індекс, в першу вільну комірку.

![Геш відкрита адресація](https://upload.wikimedia.org/wikipedia/commons/thumb/b/bf/Hash_table_5_0_1_1_1_1_0_SP.svg/380px-Hash_table_5_0_1_1_1_1_0_SP.svg.png)

## Посилання

- [Wikipedia](https://uk.wikipedia.org/wiki/%D0%93%D0%B5%D1%88-%D1%82%D0%B0%D0%B1%D0%BB%D0%B8%D1%86%D1%8F)
- [YouTube](https://www.youtube.com/watch?v=WTYaboK-NMk)