ServiceNow coding interview round for System Engineer and Senior System Engineer
Summary
I gave a coding interview round for ServiceNow for System Engineer and Senior System Engineer roles on June 20th. The test was conducted on HackerRank and involved one coding problem, 'Longest Subarray', which I was unable to solve.
Full Experience
Hi, gave a coding interview round for service Now on 20th june for System Engineer and Senior System Engineer role
the test was conducted on hacker rank. Only one problem(not sure if their were others , was not able to solve this.)
Problem: Longest Subarray a subarray of array a is defined as a contiguous block of a’s elements having a length that is less than or equal to the length of the array. For example, the subarrays of array a = {1, 2, 3} are [1], [2], [3], [1, 2], [2, 3], and [1, 2, 3].
Given an integer k = 3, the subarrays having elements that sum to a number ≤ k are [1], [2], and [1, 2]. The longest of these subarrays is [1, 2], which has a length of 2.
Given an array a, determine the longest subarray that sums to less than or equal to a given value k.
Interview Questions (1)
A subarray of array a is defined as a contiguous block of a’s elements having a length that is less than or equal to the length of the array. For example, the subarrays of array a = {1, 2, 3} are [1], [2], [3], [1, 2], [2, 3], and [1, 2, 3].
Given an integer k = 3, the subarrays having elements that sum to a number ≤ k are [1], [2], and [1, 2]. The longest of these subarrays is [1, 2], which has a length of 2.
Given an array a, determine the longest subarray that sums to less than or equal to a given value k.