Sum of Elements using Indices | Service Now | SSE | Feb 2024 | DSA | Reject
- Result
- Rejected
- Posted
- 7 Mar 2024
Summary
I interviewed for a Software Staff Engineer position at ServiceNow in February 2024. The interview focused on Data Structures & Algorithms, specifically a problem involving calculating the sum of elements within a given range, and I was unfortunately rejected.
How it went
I recently had an interview for the SSE role at ServiceNow in February 2024. The session primarily revolved around Data Structures & Algorithms, where I was presented with a specific coding challenge. Despite my efforts, the outcome was a rejection.
Questions asked (1)
- 01
Range Sum Query
Data Structures & Algorithms · Medium
Given an array of
nintegers andqqueries. Each query is defined by a start indexsand an end indexe. For each query, I needed to return the sum of elements of the indices fromstoe(inclusive).
Example:a=[1,2,3,6,3,2];q = 3
Queries:s,e-> [2,3]s,e-> [0,4]s,e-> [1,2]
Expected Output Sums:sum=[9,12,5]