Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
p2-public
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
cse332-24wi
p2-public
Commits
39cca707
Commit
39cca707
authored
3 years ago
by
WinJ
Browse files
Options
Downloads
Patches
Plain Diff
MTFList find or insert must move to front of the list
parent
d26fa2dd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/datastructures/dictionaries/MoveToFrontList.java
+3
-3
3 additions, 3 deletions
...ain/java/datastructures/dictionaries/MoveToFrontList.java
with
3 additions
and
3 deletions
src/main/java/datastructures/dictionaries/MoveToFrontList.java
+
3
−
3
View file @
39cca707
...
...
@@ -9,9 +9,9 @@ import java.util.Iterator;
/**
* 1. The list is typically not sorted.
* 2. Add new items to the front of the list.
* 3. Whenever find is called on an
item, move it to the front of the
* list. This means you remove the node from its
current position
* and make it the first node in the list.
* 3. Whenever find
or insert
is called on an
existing key, move it
*
to the front of the
list. This means you remove the node from its
*
current position
and make it the first node in the list.
* 4. You need to implement an iterator. The iterator SHOULD NOT move
* elements to the front. The iterator should return elements in
* the order they are stored in the list, starting with the first
...
...
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