Activity Selection Problem in Greedy Algorithm in C++

Activity Selection Problem in Greedy Algorithm in C++. The problem statement goes like this: Given N activities with their start time and end time. The task is to find the solution set having a maximum number of non-conflicting activities that can be executed within the given time, assuming only a single activity can be performed at a given time.

Continue ReadingActivity Selection Problem in Greedy Algorithm in C++

Traversal in Circular Linked List in C++

Traversal in Circular Linked List in C++.In this, any node can be at the starting point. So, we can traverse from any point. We can maintain a pointer to the last inserted node and the front can always be obtained as next of last and it is useful to implement a queue. Circular lists are useful in applications to go around the list. 

Continue ReadingTraversal in Circular Linked List in C++