First negative integer in every window of size k

Problem Statement The problem “First negative integer in every window of size k” states that you are given an array containing positive and negative integers, for every window of size k print the first negative integer in that window. If there is no negative integer in any window then output …

Read moreFirst negative integer in every window of size k

Priority Queue Using Singly Linked List

In priority queue using a singly linked list problem, we need to implement a priority queue by using a singly linked list. A priority queue contains the following operations, push(x, p): Add an element x with priority p at an appropriate position in the priority queue. pop(): Remove and return …

Read morePriority Queue Using Singly Linked List