Scholar@sap Interview Questions | Glassdoor.co.in

# Scholar@sap Interview Questions

47

scholar@sap interview questions shared by candidates

## Top Interview Questions

Sort: RelevancePopular Date

### Scholar@SAP at SAP was asked...

14 Jan 2020
 Write a program to add numbers present in a String , example : Gl123a45ssd908oo6r, so the program should give 123 + 45 + 908 + 6 = 1082 as the result. There were 2 more programming questions related to stacks and linkedlists and one question on probability followed by a logical puzzle question.4 Answersdef findSum(str1): temp = "0" Sum = 0 for ch in str1: if (ch.isdigit()): temp += ch else: Sum += int(temp) temp = "0" return Sum + int(temp) str1 = "Gl123a45ssd908oo6r" print(findSum(str1))import re result = re.sub("[A-z]"," ",input) res = result.split(" ") sum=0 for i in res: if not i == "": sum+=int(i) input = input()str=input() temp=0 sum=0 for i in str: if(i.isdigit()): temp=(temp*10)+int(i) else: sum=sum+temp temp=0 print(sum)Show more responsesimport re def sum_of_digits(s): p=re.compile('[0-9]') sum=0 for i in re.findall(p,s): sum+=int(i) return sum s="Gl123a45ssd908oo6r" print(sum_of_digits(s))

### Scholar@SAP at SAP was asked...

27 Nov 2019
 Write a program to find sum of numbers from a given string. ABC123DEF098QWE FIND SUM OF 123+0982 AnswersI told the interviewer that we will apply the same logic of amstrong number First we will check that the character in string are number or alphabets by using isnum() function and then applying the logic of sum = sum *10+num Sum = 0 Num = 1, first number in string. Sum = 0*10+1 Sum = 1 Num = 2 Sum = 1*10+2 Sum = 12 Num = 3 Sum = 12*10+3 Sum = 123 We got the first number 123 Now we have to find the second number. We have to run the above using loop till the character in string is a number once it is an alphabet then we will break the loop and find the next number in the string and using the above logic we will find the second number 098 then we will add both of them and we'll find the sum.String inp = "G12gur236h089dj17"; int sum = 0; int num = 0; for(int i=0;i=0)&&((ch - '9')<=9)) { int n = ch - '0'; System.out.println("Num"+n); num = (num * 10) + n; } else { sum += num; num = 0; } } sum += num; System.out.println("Sum "+sum);

### SAP Scholar Program at SAP was asked...

6 Sep 2020
 Find the Nth largest in a linked list without sorting and using arrays. Questions about object oriented concepts, questions on git , difference between binary tree and binary search tree etc.1 AnswerFirst giving them the approach of the problem and then trying to give them different by giving a ways to solve the problem .

### Scholar@SAP Programmer at SAP was asked...

14 Apr 2015
 1.Tell me about yourself? and after that 2.Diff between C and C++ 3.Diff between Multilevel inheritence and Multiple inheritance 4.One small puzzle 5.If there is a cricket world cup match to be scheduled and its time table to be prepared then write a data base tables for that using primary key and foreign key 6.Find the second largest element in an array1 AnswerHow was your performance in the online test? Were you able to complete both coding skills questions??

### SAP Scholar Program at SAP was asked...

8 Mar 2021
 Print leaf nodes of a binary tree 1 Answercoded it

### SAP Scholar Program at SAP was asked...

8 Mar 2021
 Time complexity of quick sort, how it works1 AnswerSorting & searching techniques

### SAP Scholar Program at SAP was asked...

25 Sep 2018
 find largest palindrome substring in the given string.1 AnswerCan you tell me some questions frim round1

### Scholar@SAP at SAP was asked...

17 Nov 2015
 find 2nd max no. in an array1 AnswerInteger[] array = new Integer[]{1, 2, 3, 3, 3, 4, 4, 3, 2, 0}; Integer first = array; Integer second = array; for( Integer num : array ){ if ( num > first ){ second = first; first = num; } if ( num < first && first == second ) second = num; } System.out.println(second);

### SCHOLAR@SAP PROGRAM at SAP was asked...

27 Aug 2012
 Even though I mentioned only C and C++,they asked questions on JAVA and SQL. I mean that is absurd even after I told them I don't know anything about JAVA and SQL.1 AnswerHow was your performance in online test? Were you able to complete both coding skills questions?

### SCHOLAR@SAP PROGRAM at SAP was asked...

27 Aug 2020
 Given an array element and a key,remove all key instance from the array.Be the first to answer this question
110 of 47 Interview Questions