-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdp2.py
More file actions
30 lines (23 loc) · 693 Bytes
/
dp2.py
File metadata and controls
30 lines (23 loc) · 693 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
r"""
Code for working with Dyck paths.
A Dyck path is represented as a tuple, where each
entry gives the number of boxes above-and-to-the-right
of the baseline in a row.
"""
__all__ = [
'all_dyck_paths',
'is_dyck_path',
'is_primitive',
'boxes_under_path',
]
# ---------------------------------------------------------
import itertools as it
# ---------------------------------------------------------
#### insérer du code ici ####
# ---------------------------------------------------------
if __name__ == '__main__':
import doctest
doctest.testmod()
# ---------------------------------------------------------