Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Cognizant interview experience Real time questions & tips from candidates to crack your interview

Program Analyst

Cognizant
upvote
share-icon
2 rounds | 2 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 1 month
Topics: Data Structures & Algorithm, Java Fundamentals, SQL, Numerical Ability, Python Fundamentals
Tip
Tip

Tip 1 : First clear programming fundamentals
Tip 2 : Then practice coding questions
Tip 3 : Now you can go with Data Structures and Algorithms
Tip 4 : You can prepare SQL daily 1-2 hr

Application process
Where: Campus
Eligibility: Above 6.5 CGPA
Resume Tip
Resume tip

Tip 1 : Only Mention technologies you have worked on.
Tip 2 : Highlight quick learner, hard working personality in resume

Interview rounds

01
Round
Medium
Online Coding Interview
Duration165 Minutes
Interview date16 Oct 2020
Coding problem0

Total time -2.45hr
45 mins was for coding round, in which we have to find errors in 7 codes.
The codes where pre written based on some problem, we just have to spot errors and make the code work correctly.

In the first 2hr we have numerical ability questions, mostly based on work and time, ages and profit and loss.
25 questions based on English grammar and sentences

02
Round
Medium
Face to Face
Duration60 Minutes
Interview date27 Nov 2020
Coding problem2

Timing - 1hr
Environment- Skype
Interviewer- with 10-25 year experience

1. String Palindrome

Easy
0/40
Asked in companies
CognizantInfosysThales

Given a string, determine if it is a palindrome, considering only alphanumeric characters.

Palindrome
A palindrome is a word, number, phrase, or other sequences of characters which read the same backwards and forwards.
Example:
If the input string happens to be, "malayalam" then as we see that this word can be read the same as forward and backwards, it is said to be a valid palindrome.

The expected output for this example will print, 'true'.

From that being said, you are required to return a boolean value from the function that has been asked to implement.

Try solving now

2. Nth Fibonacci Number

Easy
0/40
Asked in companies
SAP LabsTata Consultancy Services (TCS)Infosys

The n-th term of Fibonacci series F(n), where F(n) is a function, is calculated using the following formula -

    F(n) = F(n - 1) + F(n - 2), 
    Where, F(1) = 1, F(2) = 1


Provided 'n' you have to find out the n-th Fibonacci Number. Handle edges cases like when 'n' = 1 or 'n' = 2 by using conditionals like if else and return what's expected.

"Indexing is start from 1"


Example :
Input: 6

Output: 8

Explanation: The number is ‘6’ so we have to find the “6th” Fibonacci number.
So by using the given formula of the Fibonacci series, we get the series:    
[ 1, 1, 2, 3, 5, 8, 13, 21]
So the “6th” element is “8” hence we get the output.
Try solving now

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

Which is a DDL command in SQL?

Choose another skill to practice
Join the Discussion
1 reply
profile
11 months ago
def Fibonacci(n):

    if n<= 0:

        print("Incorrect input")

    elif n == 1:

        return 0
    elif n == 2:

        return 1

    else:

        return Fibonacci(n-1)+Fibonacci(n-2)
print(Fibonacci(10))
0 upvotes
0 replies
Reply
Similar interview experiences
company logo
Program Analyst
3 rounds | 4 problems
Interviewed by Cognizant
737 views
0 comments
0 upvotes
company logo
Program Analyst
2 rounds | 3 problems
Interviewed by Cognizant
615 views
0 comments
0 upvotes
company logo
Program Analyst
2 rounds | 3 problems
Interviewed by Cognizant
582 views
0 comments
0 upvotes
company logo
Program Analyst
2 rounds | 6 problems
Interviewed by Cognizant
198 views
0 comments
0 upvotes