Skip to content

Instantly share code, notes, and snippets.

@TomboDN
TomboDN / deque.py
Created September 26, 2022 18:21
Структура данных дек
from __future__ import annotations
from collections.abc import Iterable
from dataclasses import dataclass
from typing import Any
class Deque:
"""
Структура данных дек.
Методы
public class DiningPhilosophers {
public static void main(String[] args) throws Exception {
final Philosopher[] philosophers = new Philosopher[5];
Object[] forks = new Object[philosophers.length];
for (int i = 0; i < forks.length; i++) {
forks[i] = new Object();
}