Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/codemistic/Data-Structures-and-Algorithms
/ compare
Function
compare
CPP/Problems/3_FRACTIONAL_KNAPSACK.CPP:8–11 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
6
using namespace std;
7
8
bool compare(pair<int,int> p1,pair<int,int> p2)
9
{
10
return ((double)p1.first/p1.second)>((double)p2.first/p2.second);
11
}
12
13
int main()
14
{
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected