Design a VideoStudio for organizing video projects. A project owns its tracks, and each track owns its clips. Those objects form a composition hierarchy: tracks do not exist outside their project, and clips do not exist outside their track.
The provided VideoStudio class supports these operations:
VideoStudio() creates an empty studio.int createProject(String name) creates a project with no tracks and returns its id, or -1 for an empty name.int addTrack(int projectId, String name) adds a track to that project and returns its number within the project, counting from 1. It returns -1 for an empty name, an unknown project, or a deleted one.int addClip(int projectId, int trackNumber, String name) adds a clip to that track and returns its position within the track, counting from 1. It returns -1 for an empty name, an unknown or deleted project, or a track number outside the project.boolean deleteTrack(int projectId, int trackNumber) deletes that track and returns true, or returns false for an unknown or deleted project or a track number outside it. Its clips are deleted with it, and every later track moves up one number.boolean deleteProject(int projectId) deletes the project and returns true, or returns false if it is unknown or already deleted.String[] trackClips(int projectId, int trackNumber) returns that track's clip names in order. An unknown project or track returns an empty result.String[] projectTracks(int projectId) returns that project's track names in order. An unknown or deleted project returns an empty result.int projectCount() returns how many projects have not been deleted.int trackCount() returns how many tracks exist across all projects that have not been deleted.int clipCount() returns how many clips exist across all tracks of all projects that have not been deleted.Project ids are assigned in creation order, starting at 0, and are never reused. Track numbers restart at 1 for every project, while clip positions restart at 1 for every track. Because both are positions rather than permanent ids, later items shift forward when an earlier one is removed.
Your task is to implement Clip, Track, and Project as expected by the provided studio. Do not modify VideoStudio. A Track must create the clips it owns, and a Project must create the tracks it owns. Expose names and counts where needed, but do not expose mutable collections of child objects.
Input:
Output:
Explanation: The project owns one track, and that track creates and owns two clips. Clip positions are local to the track, so the two additions return 1 and 2.
Input:
Output:
Explanation: Deleting project 0 removes the project and everything it owns. Its track and clip therefore disappear from the studio-wide counts as well.
0 <= name.length <= 4020 projects, 20 tracks per project, and 20 clips per track.100 calls in total are made across all methods.Full marks when a clip is only ever created through the track that holds it and a track only through its project, so deleting a project removes its tracks and every clip underneath them in one operation. Lose points heavily when tracks or clips live in studio-level collections that outlive the project.
Full marks when deleting a track drops exactly that track's clips from the count while the rest of the project is untouched, and deleting a project drops all of its tracks and clips. Lose points heavily when a deletion at one level leaves the level below it still counted.
Full marks when track numbers and clip positions count from `1` within their owner and close up after a deletion, an empty name is refused with `-1`, and an unknown or deleted project or track answers with an empty list. Lose points for printing to stdout.
Passing every test is not enough on its own. A submission is accepted only when the design also clears the bar.
| Call | Returns |
|---|---|
| new VideoStudio() | null |
| createProject("Launch video") | 0 |
| addTrack(0, "Voiceover") | 1 |
| addClip(0, 1, "intro") | 1 |
| addClip(0, 1, "demo") | 2 |
| trackClips(0, 1) | ["intro","demo"] |
| trackCount() | 1 |
| clipCount() | 2 |
One project owns one track, and that track owns two clips. Because clip positions are local to the track, the additions return `1` and `2`.
Run checks these cases. Submit also runs a larger hidden set.

