diff --git a/Competitive programming template/Greedy_Algorithm.cpp b/Competitive programming template/Greedy_Algorithm.cpp deleted file mode 100644 index 6b9532a..0000000 --- a/Competitive programming template/Greedy_Algorithm.cpp +++ /dev/null @@ -1,38 +0,0 @@ - -// C++ program to find minimum number of denominations -// By: Virendra-94 -#include -using namespace std; - -// All denominations of Indian Currency -int deno[] = { 1, 2, 5, 10, 20, 50, 100, 500, 1000 }; -int n = sizeof(deno) / sizeof(deno[0]); - -// Driver program -void findMin(int V) -{ - // Initialize result - vector ans; - - // Traverse through all denomination - for (int i = n - 1; i >= 0; i--) { - // Find denominations - while (V >= deno[i]) { - V -= deno[i]; - ans.push_back(deno[i]); - } - } - - // Print result - for (int i = 0; i < ans.size(); i++) - cout << ans[i] << " "; -} - -// Driver program -int main() -{ - int n = 93; - cout << "Following is minimal number of change for " << n << " is "; - findMin(n); - return 0; -} \ No newline at end of file