Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/codemistic/Data-Structures-and-Algorithms
/ reverse
Function
reverse
Java/Stack/reverseasttring.cpp:20–27 ·
view source on GitHub ↗
reverse function
Source
from the content-addressed store, hash-verified
18
}
19
//reverse function
20
void reverse(){
21
if(st.size()==1)return;
22
int temp=st.top();
23
st.pop();
24
reverse();
25
pushin(temp);
26
return;
27
}
28
29
// Driver Code
30
int main()
Callers
1
main
Function · 0.70
Calls
4
pushin
Function · 0.85
top
Method · 0.80
size
Method · 0.45
pop
Method · 0.45
Tested by
no test coverage detected