Skip to content

add .contains #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 14, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
update
  • Loading branch information
eyas-ranjous committed Jul 13, 2024
commit 69da68ce9e6000ce43e5d3672f386767d2195fff
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ console.log(bidsQueue.pop()); // { id: 7, value: 8000 }
```

### contains
checks if the queue contains an element that meet a criteria in O(log(n)) runtime.
checks if the queue contains an element that meet a criteria in O(n*log(n)) runtime.

```js
carsQueue.contains((car) => car.price === 50000); // true
Expand Down
Loading