SPOJ: COINS – Bytelandian gold coins

Problem Link http://www.spoj.com/problems/COINS/ Problem Description In this problem, We can exchange each coin of value n with three coins of value (n/2),(n/3),(n/4). So, we need to find maximum value we can obtain from a coin of n value. Concepts Used This is a straightforward DP problem. Code #include<bits/stdc++.h> using namespace std; // long long int […]

Continue reading


Using SetGetGo’s Meaningful Random Word Generator API

setgetgo APIs that let you generate a meaningful random word. To use it in PHP just add a line of code $str=file_get_contents(“http://randomword.setgetgo.com/get.php”); If you want to trim the word and remove any spaces then add the following too $str=str_replace(” “,””,trim($str)); Here’s a sample code to generate a random word using PHP function RandomWord() { var […]

Continue reading