-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStos.h
More file actions
32 lines (24 loc) · 664 Bytes
/
Stos.h
File metadata and controls
32 lines (24 loc) · 664 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//
// Created by kukul on 23.10.2019.
//
#ifndef DONAUKI_STOS_H
#define DONAUKI_STOS_H
struct elem {
elem* nast;
int dane;
};
class Stos {
public:
static void push(elem* &stos, int x);
static int pop(elem* &stos);
int topEl(elem*);
static bool isEmpty(elem*);
void sortElementsWithAdditionalStack(elem* &stos);
void add(elem*& pocz_kol, elem*& kon_kol, int x);
int next(elem*& pocz_kol, elem*& kon_kol);
int firstEl(elem* pocz_kol, elem* kon_kol);
void addStack(elem*& stos1, int x);
int nextStack(elem*& stos1, elem*& stos2);
void reverse_stack(elem*& stack1, elem*& stack2);
};
#endif //DONAUKI_STOS_H