Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cse332-18au
p1
Commits
ef46ee45
Commit
ef46ee45
authored
Jan 17, 2016
by
Adam Blank
Browse files
Minor fix to extendMatch
parent
7db43c2b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/datastructures/SuffixTrie.java
View file @
ef46ee45
...
...
@@ -106,8 +106,9 @@ public class SuffixTrie extends HashTrieMap<Byte, ByteString, Boolean> {
// Note: this method has been provided for you. You should not make any
// changes to this method.
int
numMatches
=
0
;
while
(
buffer
.
hasWork
()
&&
!
this
.
currentMatch
.
isFull
()
&&
this
.
currentMatch
.
peek
(
numMatches
)
==
buffer
.
peek
())
{
while
(
buffer
.
hasWork
()
&&
this
.
currentMatch
.
size
()
<=
this
.
currentMatch
.
capacity
()
-
1
&&
this
.
currentMatch
.
peek
(
numMatches
)
==
buffer
.
peek
())
{
this
.
currentMatch
.
add
(
buffer
.
next
());
numMatches
+=
1
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment