Program Analyst

10+ Program Analyst Interview Questions and Answers for Freshers

Updated 3 Jul 2025

Asked in Amazon

3d ago

Q. Longest Common Subsequence Problem Statement

Given two strings STR1 and STR2, determine the length of their longest common subsequence.

A subsequence is a sequence that can be derived from another sequence by d...read more

Ans.

The task is to find the length of the longest common subsequence between two given strings.

  • Implement a function to find the longest common subsequence between two strings

  • Use dynamic programming to solve the problem efficiently

  • Iterate through the strings to find the common subsequence

  • Handle edge cases like empty strings or strings with no common subsequence

Asked in Amazon

3d ago

Q. Find Pair With Smallest Difference Problem Statement

Given two unsorted arrays of non-negative integers, arr1 and arr2 with sizes N and M, determine the pair of elements (one from each array) which have the sma...read more

Ans.

Find the pair of elements with the smallest absolute difference from two unsorted arrays.

  • Sort both arrays to simplify finding the pair with the smallest difference.

  • Use two pointers approach to iterate through both arrays and find the pair with the smallest difference.

  • Keep track of the minimum absolute difference and update it as you find smaller differences.

  • Return the minimum absolute difference once all pairs have been checked.

Asked in Amazon

4d ago

Q. Sum of Big Integers Problem Statement

Given two integers represented as strings, 'NUM1' and 'NUM2', compute and return their sum.

Input:

T
NUM1 NUM2
...

Output:

Sum of NUM1 and NUM2 for each test case

Example:

In...read more
Ans.

Program to compute sum of big integers represented as strings.

  • Convert strings to integers and add them digit by digit from right to left, considering carry over.

  • Handle cases where one number is longer than the other by padding with zeros.

  • Return the final sum as a string.

Asked in Amazon

3d ago

Q. Closest Sum Problem Statement

Given an array of integers ARR of size N and an integer target, find three integers in ARR such that their sum is closest to the target. If there are two closest sums, return the s...read more

Ans.

The task is to find three integers in an array whose sum is closest to a given target.

  • Iterate through all possible triplets in the array to find the closest sum to the target.

  • Keep track of the closest sum found so far and update it if a closer sum is found.

  • Return the closest sum found after iterating through all triplets.

Are these interview questions helpful?

Asked in Amazon

3d ago

Q. Longest Common Prefix Problem Statement

You are given an array ‘ARR’ consisting of ‘N’ strings. Your task is to find the longest common prefix among all these strings. If there is no common prefix, you have to ...read more

Ans.

Find the longest common prefix among an array of strings.

  • Iterate through the characters of the first string and compare with corresponding characters of other strings.

  • Stop when a character doesn't match or reach the end of any string.

  • Return the prefix found so far as the longest common prefix.

Asked in TCS

5d ago

Q. Binary Palindrome Check

Given an integer N, determine whether its binary representation is a palindrome.

Input:

The first line contains an integer 'T' representing the number of test cases. 
The next 'T' lines e...read more
Ans.

Implement a function to determine if the binary representation of a given integer is a palindrome.

  • Convert the integer to binary representation

  • Check if the binary representation is a palindrome by comparing it with its reverse

  • Return true if it is a palindrome, false otherwise

Program Analyst Jobs

Thomson Reuters International Services Pvt Ltd logo
Compliance Program Analyst and Project Manager 7-12 years
Thomson Reuters International Services Pvt Ltd
4.1
Bangalore / Bengaluru
Clinton Health Access Initiative logo
Data and Program Analyst 3-5 years
Clinton Health Access Initiative
4.2
Gadchiroli
WNS GLOBAL SERVICES PRIVATE LIMITED logo
REF70203T- Program Analyst - IT, IT Voice Support 7-11 years
WNS GLOBAL SERVICES PRIVATE LIMITED
3.3
Bangalore / Bengaluru

Asked in MAQ Software

5d ago

Q. Sum of Digits Problem Statement

Given an integer 'N', continue summing its digits until the result is a single-digit number. Your task is to determine the final value of 'N' after applying this operation iterat...read more

Ans.

Given an integer 'N', find the final single-digit value by summing its digits iteratively.

  • Iteratively sum the digits of the given integer until the result is a single-digit number

  • Output the final single-digit integer for each test case

  • Follow the constraints provided in the problem statement

Asked in Cognizant

3d ago

Q. Nth Fibonacci Number Problem Statement

Calculate the Nth term in the Fibonacci sequence, where the sequence is defined as follows: F(n) = F(n-1) + F(n-2), with initial conditions F(1) = F(2) = 1.

Input:

The inp...read more
Ans.

Calculate the Nth Fibonacci number efficiently using dynamic programming.

  • Use dynamic programming to store previously calculated Fibonacci numbers to avoid redundant calculations.

  • Start with base cases F(1) and F(2) as 1, then iteratively calculate F(n) using F(n-1) and F(n-2).

  • Ensure the input N is within the constraints 1 <= N <= 10000.

  • Return the Nth Fibonacci number as the output.

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Asked in Cognizant

1d ago

Q. What are the basic concepts of OOP and can you explain them?

Ans.

Object-oriented programming concepts include encapsulation, inheritance, and polymorphism.

  • Encapsulation: Bundling data and methods together in a class to hide implementation details.

  • Inheritance: Creating new classes from existing ones, inheriting their properties and behaviors.

  • Polymorphism: Objects of different classes can be treated as objects of a common superclass.

  • Example: Encapsulation - A class 'Car' with private variables like 'speed' and public methods like 'accelerate...read more

Asked in Cognizant

4d ago

Q. What do you know about network security?

Ans.

Network security refers to the practice of protecting computer networks from unauthorized access or attacks.

  • Network security involves implementing various measures to prevent unauthorized access to a network, such as firewalls, intrusion detection systems, and virtual private networks (VPNs).

  • It also includes ensuring the confidentiality, integrity, and availability of data transmitted over the network.

  • Examples of network security threats include malware, phishing attacks, and...read more

Asked in Cognizant

6d ago

Q. What is the meaning of an abstract class?

Ans.

An abstract class is a class that cannot be instantiated and is used as a base class for other classes.

  • An abstract class can have abstract and non-abstract methods.

  • Abstract methods have no implementation and must be implemented by the derived classes.

  • An abstract class can have constructors and fields.

  • An example of an abstract class is the Shape class, where the methods like area() and perimeter() are abstract and must be implemented by the derived classes like Circle and Rect...read more

Asked in Fynd

5d ago
Q. What are indexes in SQL?
Ans.

Indexes in SQL are data structures that improve the speed of data retrieval operations on a database table.

  • Indexes are created on columns in a table to quickly retrieve rows based on the values in those columns.

  • They can be unique, allowing only unique values to be stored in the indexed column.

  • Examples of indexes include primary keys, which uniquely identify each row in a table, and foreign keys, which establish relationships between tables.

Interview Experiences of Popular Companies

TCS Logo
3.6
 • 11.1k Interviews
Infosys Logo
3.6
 • 7.9k Interviews
Cognizant Logo
3.7
 • 5.9k Interviews
Amazon Logo
4.0
 • 5.4k Interviews
Capgemini Logo
3.7
 • 5.1k Interviews
View all
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary

Program Analyst Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+

Reviews

10L+

Interviews

4 Cr+

Salaries

1.5 Cr+

Users

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2025 Info Edge (India) Ltd.

Follow Us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter
Profile Image
Hello, Guest
AmbitionBox Employee Choice Awards 2025
Winners announced!
awards-icon
Contribute to help millions!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
Add office benefits
Add office benefits