Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
Blatt 03
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Algorithmen Datenstrukturen und Datenabstraktion WS22
Blatt 03
Commits
05780632
Commit
05780632
authored
2 years ago
by
nilsl99
Browse files
Options
Downloads
Patches
Plain Diff
Changed StackList.__init__
parent
eb61de54
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Aufgabe03a.py
+22
-18
22 additions, 18 deletions
Aufgabe03a.py
with
22 additions
and
18 deletions
Aufgabe03a.py
+
22
−
18
View file @
05780632
class
Stack
(
list
):
class
Stack
():
def
__init__
(
self
,
l
=
[]):
def
__init__
(
self
,
l
=
[]):
self
.
stack
=
l
self
.
stack
=
l
...
@@ -35,7 +36,10 @@ class ListElement:
...
@@ -35,7 +36,10 @@ class ListElement:
class
StackList
:
class
StackList
:
def
__init__
(
self
,
l
):
def
__init__
(
self
,
l
=
None
):
if
l
is
None
:
self
.
first_element
=
None
else
:
self
.
first_element
=
ListElement
(
l
[
-
1
])
self
.
first_element
=
ListElement
(
l
[
-
1
])
element
=
self
.
first_element
element
=
self
.
first_element
for
value
in
l
[
1
::
-
1
]:
for
value
in
l
[
1
::
-
1
]:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment