Ho presentato la mia candidatura tramite segnalazione di un dipendente. La procedura ha richiesto un giorno. Ho sostenuto un colloquio presso DoControl (Tel Aviv) nel mese di mag 2023
Colloquio
The process is very clear and fast. No time wasted and communications scheduling and after the interview are super clear and efficient. They even call you back to update me that you've been rejected, which I appreciated.
Domande di colloquio [3]
Domanda 1
Explain what certain javascript vectorial functions filter and find, explain what the code does and if it could be implemented more efficiently.
Write a SQL query that does JOIN on a table to itself. If you have an employee table with name, id, bossid, and salary, find employees that earn more than their boses
Ho presentato la mia candidatura tramite segnalazione di un dipendente. La procedura ha richiesto una settimana. Ho sostenuto un colloquio presso DoControl (Tel Aviv) nel mese di mag 2023
Colloquio
I interviewed with 2 members, one is a system architect and the other is senior developer. Both are very nice and polite and got straightaway to the tech part of the interview.
Domande di colloquio [1]
Domanda 1
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.