Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Tiwarishashwat/InterviewCodes
/ coloredCells
Method
coloredCells
CountTotalNumberOfColoredCells.java:2–4 ·
view source on GitHub ↗
(int n)
Source
from the content-addressed store, hash-verified
1
class
Solution {
2
public
long coloredCells(
int
n) {
3
return
1 + (long) n * (n-1) * 2;
4
}
5
}
Callers
nothing calls this directly
Calls
no outgoing calls
Tested by
no test coverage detected