super easy java solution!!
\nclass Solution {\n    public int firstDayBeenInAllRooms(int[] nextVisit) {\n        int mod = 1_000_000_007;\n        int n = nextVisit.length;\n        long 
```\nclass Solution {\n    public int firstDayBeenInAllRooms(int[] nextVisit) {\n        int mod = 1_000_000_007;\n        int n = nextVisit.length;\n        long dp[] = new long[n];\n        for (int i = 1; i < n; ++i) {\n            dp[i] = (dp[i - 1] + dp[i - 1] - dp[nextVisit[i - 1]] + 2 + mod) % mod;\n        }\n        return (int) dp[n - 1];\n    }\n}\n```
['Java']