# Algorithms

### Indexed Priority Queue with Implementation

#include using namespace std;  template   class indexed_priority_queue {          unordered_map m;          vector v;          long long numberOfElement;          Comparator comp;          long long capacity = LLONG_MAX;          long long int getValueIndex(T1 key)    {        if…

### Shortest Path Properties

Shortest Path PropertiesThe shortest path problem is the problem of finding a path between two vertices (or nodes) in a…

### Maximum sum obtained by dividing Array into several subarrays as per given conditions

Maximum sum obtained by dividing Array into several subarrays as per given conditionsGiven an array arr[] of size N, the…

### How to solve time complexity Recurrence Relations using Recursion Tree method?

The Recursion Tree Method is a way of solving recurrence relations. In this method, a recurrence relation is converted into…

### Minimize K to let Person A consume at least ceil(N/(M + 1)) candies based on given rules

#include using namespace std;  bool check(int K, int n, int m,           vector arr,           int good_share){    int candies = n, taken = 0;      while (candies >…