OneTrust | Senior Software Engineer Role | Frontend Engineer
Summary
I interviewed for a Senior Software Engineer (Frontend) role at OneTrust. The round was resume‑based and covered JavaScript/TypeScript, Angular concepts, and coding problems such as merge intervals and device‑event summarisation.
Full Experience
Interview Experience
OneTrust | Senior Software Engineer (Frontend) | Round 1
Experience: 5 years Location: Indiranagar, Bangalore Role: Frontend engineer (Angular)
Resume based - Explanations related to all the points in the resume might be asked
Javascript/Typescript Output based questions - shared below JS fundamentals - Closures, hoisting, Promises, async…await Type vs interface
Angular Migrations - what are the complications that might get involved Change detection - behaviour of parent and child component when we are using “OnPush” Sanitisation in Angular Security measures we can take while developing in Angular
Problem solving - Leetcode medium level questions - Array, strings, Map, stack, queues Q. Merge intervals problem - but question was put in a different way Q. Another question specific to typescript and problem solving shared below
console.log('a')
async function fn() {
console.log('b');
await null;
console.log('c');
}
console.log('d');
//----------------------------------------------
/*
Given an array of meeting/booking time intervals like [[1,3],[2,6],[8,10],[15,18]] (each [start, end]), write a function mergeIntervals(intervals) that merges all overlapping intervals and returns the merged list, e.g. [[1,6],[8,10],[15,18]]. Then tell me the time and space complexity
*/
let intervals = [[2,6],[1,3],[8,10],[15,18]];
//----------------------------------------------------
/*
Return one summary per deviceId.
Use the latest event by timestamp for latestStatus and latestTimestamp.
Return the total event count per device.
Do not mutate the input array.
State time and space complexity.
*/
type DeviceEvent = {
id: string;
deviceId: string;
status: 'online' | 'offline';
timestamp: number;
};
type DeviceSummary = {
deviceId: string;
latestStatus: DeviceEvent['status'];
latestTimestamp: number;
eventCount: number;
};
function summarizeByDevice(events: DeviceEvent[]): DeviceSummary[]{
// code here...
}
Interview Questions (2)
Merge Intervals
Given an array of meeting/booking time intervals like [[1,3],[2,6],[8,10],[15,18]] (each [start, end]), write a function mergeIntervals(intervals) that merges all overlapping intervals and returns the merged list, e.g. [[1,6],[8,10],[15,18]]. Also provide the time and space complexity of your solution.
Device Events Summary
Return one summary per deviceId. Use the latest event by timestamp for latestStatus and latestTimestamp. Return the total event count per device. Do not mutate the input array. State the time and space complexity. Types are provided:
type DeviceEvent = {
id: string;
deviceId: string;
status: 'online' | 'offline';
timestamp: number;
};
type DeviceSummary = {
deviceId: string;
latestStatus: DeviceEvent['status'];
latestTimestamp: number;
eventCount: number;
};