queue

May 15, 2022

Sorting an ADT Queue

I’m tasked to create a person class that holds their name and age, create a Queue class that can hold an array of objects and then be able to sort them alphabetically and by age using quicksort. When

Read More
May 2, 2022

How can I implement this in Queue?

Grigor went shopping at a mall. He wanted to buy perfumes. The prices of the perfume of the available N brands is given by an array P[1], P[2]… P[N]. There are infinite supplies of each perfume bran

Read More
April 28, 2022

Wait until previous event finish Rx

In my code, I have events that need to be processed sequentially and others in parallel.I managed to do the parallel part but I can’t do the sequential version.event.ofType(Message.class).groupBy(Me

Read More
April 17, 2022

Node coordinate overwritten in BFS

(I’m using C) I’m writing a BFS algorithm for a 2d maze array. I use a struct to represent a node in my queue struct. In my node struct, I have a pointer to store a previous node, its distance from th

Read More