Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Vishruth-S/CompetitiveCode
/ f
Function
f
HackerEarth_problems/Shubham and Subarray Xor/solution.cpp:72–82 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
70
}
71
72
string f(int n)
73
{
74
string s(M,
'0'
);
75
for (int i = 0; i < M; i++)
76
{
77
s[i] = (
'0'
+ n % 2);
78
n = n / 2;
79
}
80
reverse(s.begin(), s.end());
81
return s;
82
}
83
84
int main()
85
{
Callers
1
main
Function · 0.85
Calls
1
reverse
Function · 0.50
Tested by
no test coverage detected