Pregunta de entrevista de Tekion

All questions involved priority queue based on heap 1. Design Stock Trading function. 2. SQL: Add missing month rows to a given sql table. 3. Find visitor increase in count from a file using DS and ALgos. 4. Why are some tasks / stages skipped in spark?

Respuesta de la entrevista

Anónimo

1 feb 2022

input visitors = [ { "company": "flipkart", "month": 12, "year": 2021, "visitors": 20 }, { "company": "amazon", "month": 12, "year": 2021, "visitors": 17 }, { "company": "flipkart", "month": 11, "year": 2021, "visitors": 18 }, { "company": "amazon", "month": 11, "year": 2021, "visitors": 23 }, { "company": "flipkart", "month": 10, "year": 2021, "visitors": 14 }, { "company": "amazon", "month": 10, "year": 2021, "visitors": 25 } ] output company | mom | year | increase -------------------------------- flipkart | 11-12 | 2021 | 2 flipkart | 10-11 | 2021 | 4 amazon | 11-12 | 2021 | -6 amazon | 10-11 | 2021 | -2