Given the following code: class Asset { id: string; companyId: string; body: any; public equals(asset: Asset): boolean { return this.companyId == asset.companyId && this.id == asset.id; } } const diffUpdateAssets = (apiAssets: Asset[], dbAssets: Asset[]): Asset[] => { return apiAssets.filter( (asset: Asset) => dbAssets.find(asset.equals) ); }; const diffInsertAssets = (apiAssets: Asset[], dbAssets: Asset[], Map map): Asset[] => { return apiAssets.filter( (asset: Asset) => !dbAssets.find(asset.equals) ); }; const diffDeleteAssets = (apiAssets: Asset[], dbAssets: Asset[]): Asset[] => { return dbAssets.filter( (asset: Asset) => !apiAssets.find(asset.equals) ); }; export const syncAssets = (apiAssets: Asset[], dbAssets: Asset[]) => { return { toInsert: diffInsertAssets(apiAssets, dbAssets), toDelete: diffDeleteAssets(apiAssets, dbAssets), toUpdate: diffUpdateAssets(apiAssets, dbAssets), }; }; 1. Explain what the above code does. What's the time complexity of the code. How it can be improved? how this can be imporved. 2. Simple subquery / inner query SQL question, just learn sub queries. 3. Design question: All of our integrations in DoControl are based on webhooks notifications from the SaaS providers. In order to process those messages we perform a registration of our predefined POST webhook endpoint that will accept those events. Please plan a basic flow which will: a. Receive message from Google Drive b. Enrich its data with an api call performed per each event c. Insert the enriched record to a database.