SAP | 2020

Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2020-10-06Added By Anonymous
Source: Link

Company: SAP
Role: unknown
Interview Stage: unknown
Location: unknown
Year: 2020

Original Post Content:

Given two vectors. One contain array element "ele" and other indexes "ind" to push corresponding element at that index in new array shifting all elements to its right. For ex: ele = {0,1,2,3,4} ind ={0,1,2,1,2} ans: {0,3,4,1,2} ele: {0,1,2} ind: {0,1,0} ans: {2,0,1} .

Comments