Open
Conversation
kayacanv
requested changes
Mar 17, 2023
Member
kayacanv
left a comment
There was a problem hiding this comment.
The overleaf link does not allow me to left comments on the document.
I have comments about the changes can be made on the document, I can comment on where you should review/change
| If and only if for all sufficiently large values of x, the absolute value of $f(x)$ is at most a positive constant multiple of $g(x)$. That is, $f(x)$ = $O(g(x))$ if and only if there exists a positive real number M and a real number $x_0$ such that: \\ | ||
| $$|f(x)| \leq Mg(x)\ for \ all\ x\ such\ that\ x_0 \leq x$$ | ||
| In many contexts, the assumption that we are interested in the growth rate as the variable x goes to infinity is left unstated, and one writes more simply that: | ||
| In many contexts, the assumption that we are interested in the growth rate as the variable $x$ goes to infinity is left unstated, and one writes more simply that: |
Member
There was a problem hiding this comment.
I think this sentences is verry complex, it can be simplified
| priority_queue<int> pq; | ||
|
|
||
| for(int i = 0 ; i < 5 ; i ++){ | ||
| pq.push(i); |
Member
There was a problem hiding this comment.
this looks like stack implementation, not PQ implementation. You should put more complex code in here,
instead of 0 to 5. putting random values, works better.
https://www.geeksforgeeks.org/efficient-way-to-initialize-a-priority-queue/
| cout << pq.top() << " "; | ||
| pq.pop(); | ||
| } | ||
| // 4 3 2 1 0 |
Member
There was a problem hiding this comment.
Suggested change
| // 4 3 2 1 0 | |
| // Output: 4 3 2 1 0 |
|
|
||
| \textbf{C++:} They are no different than stack, queue and deque we already know. It provides the implementation, you can simply include the libraries and use them. See \href{http://www.cplusplus.com/reference/queue/queue/}{queue}, \href{http://www.cplusplus.com/reference/stack/stack/}{stack}, \href{http://www.cplusplus.com/reference/deque/deque/}{deque} | ||
|
|
||
| \subsection{Priority Queues} |
Member
There was a problem hiding this comment.
Suggested change
| \subsection{Priority Queues} | |
| \subsection{Priority Queues & Heaps} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overleaf link: https://www.overleaf.com/read/vnvpgnprgmnk