L&T Infotech

Recruitment Process for L&T Infotech consists of 4 levels. First is the general aptitude round. Second Level is the coding round which is optional for all. If you want a higher package one need to qualify the second level also. The level of the coding question is mostly basic. After the first two rounds, Technical Interview and HR Interview.

Coding Question for Level 2

Write a function to find all the words in a string which are palindrome.
Note: A string is said to be palindrome if the reverse of the string is same. For example, "abba" is a palindrome, but "abbc" is not a palindrome.
Input Specification & Example

    
     input1: string              input1: this is level 71
     input2: Length of string    input2: 16
    
Output Specification & Example
    
     output: return the number of palindromes in the given string.
     In the above case out put is
     1
    
    
    def checkPalindrome(input1, input2):
        words = input1.split(" ")
        count = 0
        for elements in words:
            if elements.lower() == elements.lower()[::-1]
                count += 1
        return count
        pass