-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Labels
bugSomething isn't workingSomething isn't workingduplicateThis issue or pull request already existsThis issue or pull request already exists
Description
Example
let a = new Deque<number>()
a.pushFront(4)
console.log(a)
console.log(a.toArray())
let b = new Deque<number>()
b.pushBack(4)
console.log(b)
console.log(b.toArray())
Output
Deque {
_backElements: [],
_frontElements: [ 4 ],
_backOffset: 0,
_frontOffset: 0
}
[]
Deque {
_backElements: [ 4 ],
_frontElements: [],
_backOffset: 0,
_frontOffset: 0
}
[ 4 ]
Explanation
toArray() returns empty array for a above which has only _frontElements, but works fine for b which has _backElements
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingduplicateThis issue or pull request already existsThis issue or pull request already exists
Type
Projects
Status
Done