SAP Labs Coding Questions

Coding Questions asked in SAP

SAP Coding Questions on this page will help you to know more about the coding section of SAP recruitment drive. The section carries a heavy weightage and is an elimination round.

Get to know everything about SAP recruitment and coding questions on this page. You’ll get detailed information about SAP Eligibility Criteria, Recruitment Process and Salary Breakdown.

SAP Coding Question

About SAP

SAP enables the world to function more efficiently and enhances people’s lives through a global network of partners, clients, workers, and thought leaders.

As the pioneer in enterprise application software, we improve business operations for organisations of all sizes and across all sectors by redefining ERP and building networks of intelligent firms that offer supply chain transparency, resilience, and sustainability.

Recruitment Process at SAP

The recruitment process of SAP is mentioned here which can help you to understand the process opted by SAP to recruit candidates for the position of SAP Scholar.

The SAP Recruitment Process contains the mentioned rounds.

  • MCQ and Coding
  • Virtual Interview

We have even tabulated some more information for your reference and understanding.

SAPRelated Information
Batch2023
CourseB.Tech (CS / IT / ECE / EE)
Education
  • Graduation Marks – 70% and above
  • 10th and 12th Marks – 60% and above apply
  • No backlogs
Rounds
  • MCQ and Coding is of 1hr 15 minutes
  • Number of Sections – 3
  • All rounds will be elimination rounds
Cost to Company (CTC)6.52 LPA
Salary Breakdown4.2LPA Stipend & 2.32LPA Benefits

Prime Course Trailer

Related Banners

Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription

SAP Coding Questions

Question 1 : Max Unique Exponent

Problem Statement :

You’re given a string where multiple characters are repeated consecutively. You’re supposed to reduce the size of this string using mathematical logic given as in the example below :

Input :
aabbbbeeeeffggg

Output:
a2b4e4f2g3

Input :
abbccccc

Output:
ab2c5

Question 2 : Sum of K Farthest items

Problem Statement  :

You are given an array of length “len” ,another item called k and an integer value x. Your job is to find the sum of k farthest items in the array from x.

First line has len, k and x respectively
2nd line has the array

Example :

Input :
5 3 20
21 4 15 17 11

Output :
30

4, 15 and 11 are farthest from 20. Thus, their sum will be the answer.

Question 3 : Find Nth largest and smallest

Problem Statement  :

Write a program to find the nth largest and nth smallest item in the array and print them in the same line.

Input Format
The first line has the following –
Size of array, value of n
2nd line has the array

Output Format
Nth largest and nth smallest respectively

Input :                                 Output :
6 3                                       3 4
1 2 3 4 5 6

Question 4 : Prime Number Sum

Problem Statement  :

Write a function to solve the following equation :

a3 + a2b + 2a2b + 2ab2 + ab2 + b3.

Write a program to accept three values in order of a, b and c and get the result of the above equation.

Question 5 :Find no. of tyres

Problem Statement  :

In the city, there are a bunch of dealerships who sell bikes & cars. A function is there which tells how many dealerships there are and the total number of cars in each dealership.

Your job is to calculate how many tyres would be there in each dealership.
If you are using the predefined function use this structure,

Struct dealership {
Int cars;
Int bikes;
}

Input :                 Output :
3                          20
4 2                      16
4 0                       8
1 2

Explanation :

  1. There are total 3 dealerships
  2. Dealerships1 contains 4 cars and 2 bikes
  3. Dealerships2 contains 4 cars and 0 bikes
  4. Dealerships3 contains 1 cars and 2 bikes
  5. Total number of tyres in dealerships1 is (4 x 4) + (2 x 2) = 20
  6. Total number of tyres in dealerships2 is (4 x 4) + (0 x 2) = 16
  7. Total number of tyres in dealerships3 is (1 x 4) + (2 x 2) = 8

FAQs on SAP Coding Questions with Solutions

Question 1: What is the salary offered by SAP?

SAP offers a salary of 6.25 Lakhs per annum.

Question 2: Are all rounds in SAP elimination rounds?

Yes, all the rounds in SAP recruitment process are elimination rounds. 

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others

Checkout list of all the video courses in PrepInsta Prime Subscription

Checkout list of all the video courses in PrepInsta Prime Subscription