Last active
September 15, 2017 13:15
-
-
Save ajile/27d0cbb098a1a992278ba507b63a5c5e to your computer and use it in GitHub Desktop.
Задача написать алгоритм, который сортирует оба массива таким образом, чтобы связи проведенные между `queues` и `users` не пересекались. Дальнейшее развитие алгоритма основывается на знании того, что пользователь может иметь отношение к нескольким очередям.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const queues = [ | |
| { top: 100, name: "Development" }, | |
| { top: 200, name: "English" }, | |
| { top: 300, name: "Russian" } | |
| ]; | |
| const users = [ | |
| { top: 100, name: "Dmitry Lantcov", queues: [queues[2]] }, | |
| { top: 200, name: "Ксения Свидунович", queues: [] }, | |
| { top: 300, name: "Оксана Деменко", queues: [queues[0]] }, | |
| { top: 400, name: "Родионов Артур", queues: [] }, | |
| { top: 500, name: "Dariya Markasova", queues: [] }, | |
| { top: 600, name: "Галина Лебедева", queues: [] }, | |
| { top: 700, name: "Виктор Назаров", queues: [] } | |
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // TBA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // TBA |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment