Great Explanation! Just want to confirm 20:40, Is insertion order preserved in PriorityQueue too? I think the elements are stored based on the priority order which is ascending by default. can you please confirm? Thanks
Insertion order is not preserved...que.add("A"); que.add("om"); que.add("Tom"); que.offer("A"); System.out.println(que); Output:[A, A, Tom, om] @SDET could you confirm?
Your teaching was excellent sir, but I have doubts, sir if I use element(), peek() will I get the topmost element sir I add 4 elements by using add() like this order K, V, C, B added sir I get the element by using element() and peek() I get the element was 'B' sir... Could you please explain why and what's the reason...
Sir, As you said, insertion order is preserved in the priority queue but it doesn't seem like this as I've tried this one & Insertion order is not getting preserved. Only sorted results will be shown in the console. Could you pls confirm once. ?
I appreciate your teaching but just came to know by seeing comments below i.e., Insertion order is not preserved in PriorityQueue. I even cross checked, it is not preserved. Thanks
thank you sir for great teaching but i have one little doubt that sir in priority queue hertogeneous data can save in IDE 2021-12 4.22.0 version is depend on version? can please ensure that?
Sir priorityQueue class implements Queue interface whereas LinkedList class implements deque interface which is child interface of Queue interface but you mentioned LinkedList class implements Queue interface.
Hi Sir, I have a question for priority queue, you said it preserves the insertion order but for me it is sorting the queue when I am trying to sys out the same. Can you please explain it?
Dear sir, your way to learning is very simple and great. I will follow your instructions.
Thanks
I have watched many channels in youtue But ur explanation Just sprb remembered for Long time sir
Thank u sir
Welcome
Thank you so much, sir. You explained very well. Hats off to you!
Superb explanation 👌. Sir pls teach full core java and data structures.
Love this collections series, thanks so much!
You are so welcome!
Sir, you are doing such a great job thank you for your guidance videos 👍🏻
welcome
Love the way of teaching best video on the internate for queue concept
Thank you sir gud explanation 😊
My pleasure!
In priority queue insertion order based on default natural sorting, duplicated allowed, hetrogeneous are not allowed , null insertion not possible .
We admire your work sir💫💫
Thanks
I have to mention two points.
1) LinkedList implements Deque
2) Insertion order is not maintained in the Priority queue.
Yes , Insertion order is not maintained in priority queue.
1) Priority queue maintains natural ordering of the language
2) Priority queue creates default size of 11 in the memory
superb and excellent. explained in a very simple manner. remembered my college days.
Thanks
@SDET- QA Automation Techie please correct it ..priority queue will not preserve insertion order
Got few insights, thanks
Welcome
thanks for this owsome tutorial:-)
You're welcome 😊
Top Notch Content Sir .......
very good explanation.
Thanks
Sir, The way the topics are covered are awesome.Can you please cover BDD cucumber framework.
Thank You!
Welcome
You mentioned that offer() method returns false if insertion is not successful, but in the code example, it threw ClassCastException.
yes
Thanks sir.
Most welcome
Sir, in priority queue insertion order is not maintained. Otherwise, I have followed all your video. Your videos are superb,
Thank you sir
Welcome
thank you so much sir given valuable information to us , sir any planing to reaming collection topics
cant we use for loop in case of arrayList?
Yes
sir,in priority queue is insertion order preserved????
sir what about queue interfaces???
Great Explanation!
Just want to confirm 20:40, Is insertion order preserved in PriorityQueue too?
I think the elements are stored based on the priority order which is ascending by default.
can you please confirm?
Thanks
Yes Insertion order is preserved PriorityQueue too , 8:06
Insertion orer is not preserved in priority Queuw
Insertion order is not preserved...que.add("A");
que.add("om");
que.add("Tom");
que.offer("A");
System.out.println(que);
Output:[A, A, Tom, om] @SDET could you confirm?
I also have the same doubt.
maximum ASCII value will have the highest priority. Output ordered based on ASCII value
Your teaching was excellent sir, but I have doubts, sir if I use element(), peek() will I get the topmost element sir I add 4 elements by using add() like this order K, V, C, B added sir I get the element by using element() and peek() I get the element was 'B' sir... Could you please explain why and what's the reason...
Sir, As you said, insertion order is preserved in the priority queue but it doesn't seem like this as I've tried this one & Insertion order is not getting preserved. Only sorted results will be shown in the console. Could you pls confirm once. ?
Insertion order is not preserved . PriorityQueue return elements in ascending order.
Thankyou for the collection series sir....
Welcome
Sir which algorithm it follow internally.
I appreciate your teaching but just came to know by seeing comments below i.e., Insertion order is not preserved in PriorityQueue.
I even cross checked, it is not preserved.
Thanks
thank you sir for great teaching but i have one little doubt that sir in priority queue hertogeneous data can save in IDE 2021-12 4.22.0 version is depend on version? can please ensure that?
How is insertion Order preserved in priority queue?
Please make video tree set and treemap
You are the best sir please reply my mail regarding QA doubt which I have sent
Thanks
Welcome
Sir.. Queue doesn't allow duplicates then how priority queue allows duplicates?
Sir.
Priority queue doesn't allow insertion order..
Sir priorityQueue class implements Queue interface whereas LinkedList class implements deque interface which is child interface of Queue interface but you mentioned LinkedList class implements Queue interface.
ArrayDqeueue implements dequeue interface. LinkedList implements Queue and LIst
❤❤
Hi Sir, I have a question for priority queue, you said it preserves the insertion order but for me it is sorting the queue when I am trying to sys out the same. Can you please explain it?
maximum ASCII value will have the highest priority.Output ordered based on ASCII value
priority queue will not preserve insertion order
it was a mistake, priorityQueue does not preserve insertion but Linkedlist does
10:00
cant able to understand saaar