C ++ implementation of the above approach
#include <bits/stdc++.h> NEW_LINE using namespace std ; void optimum_sequence_jobs ( vector < int > & V , double P ) { int j = 1 , N = V . size ( ) - 1 ; double result = 0 ;