SAP Labs Coding Questions
1 / 18
Each date is in the form ddmmmyyyy where
dd is the set {0-31}
mmm is in the set {Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec)
yyyy is four digits.
Example
dates = {'01 Mar 2017';'03 Feb 2017';'15 Jan 1998']
The array dates sort to ['15 Jan 1998';'03 Feb 2017';'01 Mar 2017';]
Input : {'01 Mar 2017';'03 Feb 2017';'15 Jan 1998']
Output :
Tags:SAP Labs
2 / 18
Example:
Intput:
ele = {0, 1, 2, 3, 4} ind ={0, 1, 2, 1, 2}
Output: {0, 3, 4, 1, 2}
Input : ele: {0, 1, 2} ind: {0, 1, 0}
Output :
Tags:SAP Labs
3 / 18
1
12
123
1234
123
12
1
Input : 4
Output :
Tags:SAP Labs
4 / 18
Input : NA
Output : NA
Tags:SAP Labs
5 / 18
Input : NA
Output : NA
Tags:SAP Labs
6 / 18
Input : NA
Output : NA
Tags:SAP Labs
7 / 18
Input : NA
Output : NA
Tags:SAP Labs
8 / 18
Input : NA
Output : NA
Tags:SAP Labs
9 / 18
Hint:An anagram of a string is another string that contains same characters, only the order of characters can be different.
Example: "abcd" and "dabc" are anagram of each other.
Input : LISTEN
Output :
Tags:SAP Labs
Q4I highly advised to practice all the basics and standard program asked at freshers or experienced level job interview in SAP Labs. Practice our hand-picked coding interview questions asked in SAP Labs. You can programed the given question in any language, you can post your answer and same time you can review the other answer. It is always recommanded to write your own program first and then refer others answers. At this page we have covers all the SAP Labs coding questions in 2020 and previously asked in their Interview round or coding rounds.
Top Kudos Contributor
Trending Programming Qs.
- Write a program to print next to the last word of a sentence.
- Write a program to reverse the string?
- Write a program to reverse the string?
- Write fibonacci series program. INPUT: 10 term OUTPUT: 0 1 1 2 3 5...
- Given a string, say sentence=" this is crazy and fun" and a list, say ...
- Write a program to print the pyramid up to the passed integer value. ...
Last Month Contributor
- Write a program to count the no. of words in the given string?
- Write a program to print next to the last word of a sentence.
- Write a program to reverse the string?
- Write a program to convert uppercase to lower case and vice versa of a...
- Given a string, say sentence=" this is crazy and fun" and a list, say ...