Power Programmer

20+ Power Programmer Interview Questions and Answers

Updated 12 Jul 2025

Asked in Infosys

1d ago

Q. You are given a sequence of N integers, a[1],a[2],,,,,a[n].

Ans.

Given a sequence of N integers, find the maximum sum of any contiguous subarray.

  • Use Kadane's algorithm to find the maximum sum subarray in O(n) time complexity.

  • Initialize two variables, max_so_far and max_ending_here, to track the maximum sum.

  • Traverse the array and update max_ending_here and max_so_far accordingly.

  • Return max_so_far as the answer.

Asked in Infosys

5d ago

Q. Why do we need normalization in DBMS? What are its advantages and disadvantages?

Ans.

Normalization in DBMS is important to reduce data redundancy and improve data integrity.

  • Normalization helps in organizing data in a structured manner.

  • It reduces data redundancy and improves data integrity.

  • It helps in efficient storage and retrieval of data.

  • Normalization can also help in avoiding update anomalies.

  • However, over-normalization can lead to complex queries and slower performance.

Power Programmer Interview Questions and Answers for Freshers

illustration image

Asked in Infosys

2d ago

Q. Difference between TCP and UDP protocol and also which is the better one.

Ans.

TCP is a connection-oriented protocol while UDP is connectionless. Both have their own advantages and disadvantages.

  • TCP provides reliable, ordered, and error-checked delivery of data while UDP does not guarantee any of these.

  • TCP is slower but more reliable while UDP is faster but less reliable.

  • TCP is used for applications that require high reliability and accuracy while UDP is used for applications that require speed and efficiency.

  • Examples of TCP-based applications include e...read more

Asked in Amazon

4d ago

Q. Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands.

Ans.

Count the number of islands in a given matrix of 0's and 1's.

  • Use DFS or BFS to traverse the matrix and mark visited cells.

  • For each unvisited cell with a value of 1, increment the island count and mark all connected 1's as visited.

  • Repeat until all cells have been visited.

  • Time complexity: O(m*n), where m and n are the dimensions of the matrix.

Are these interview questions helpful?

Asked in Infosys

2d ago

Q. Find out the maximum possible average value of sub-sequences of an array a.

Ans.

Find the maximum possible average value of sub-sequences of an array.

  • Calculate the prefix sum of the array.

  • Iterate through all possible sub-sequences and calculate their average.

  • Return the maximum average value.

Asked in Infosys

4d ago

Q. What are the differences between lists and tuples in Python, including their time complexities?

Ans.

List and tuple are both used to store collections of data in Python, but have different properties and time complexities.

  • Lists are mutable, while tuples are immutable

  • Lists use more memory than tuples

  • Lists have a variety of built-in methods, while tuples have fewer

  • Accessing an element in a tuple is faster than in a list

  • Appending to a list is faster than appending to a tuple

Power Programmer Jobs

Infosys Limited logo
Power Programmer (Tech Arch) - Digital Consulting - Q2-26 8-11 years
Infosys Limited
3.6
Bangalore / Bengaluru
Infosys Limited logo
Power Programmer (Senior Tech Arch) - Digital Consulting - Q2-26 11-15 years
Infosys Limited
3.6
Bangalore / Bengaluru
Infosys Limited logo
Power Programmer (Tech Arch) - Cloud Consulting - Q2-26 8-11 years
Infosys Limited
3.6
Bangalore / Bengaluru

Asked in Infosys

4d ago

Q. What is the difference between the TCP/IP model and the OSI model in computer networks?

Ans.

TCP/IP and OSI are two different models used for computer networks.

  • TCP/IP has 4 layers while OSI has 7 layers.

  • TCP/IP is used in the internet while OSI is used in academic and research environments.

  • TCP/IP is more flexible while OSI is more rigid.

  • TCP/IP is a practical model while OSI is a theoretical model.

  • Examples of TCP/IP protocols include HTTP, FTP, and SMTP while examples of OSI protocols include X.25 and ISDN.

5d ago

Q. What are joins? How are they useful?

Ans.

Joins are used to combine data from two or more tables based on a related column.

  • Joins are useful for retrieving data from multiple tables that have a relationship.

  • There are different types of joins such as inner join, left join, right join, and full outer join.

  • Inner join returns only the matching rows from both tables.

  • Left join returns all the rows from the left table and matching rows from the right table.

  • Right join returns all the rows from the right table and matching row...read more

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Asked in Infosys

2d ago

Q. Explain method overloading and method overriding in detail with examples.

Ans.

Method overloading and overriding are two concepts in object-oriented programming that allow for the creation of multiple methods with the same name.

  • Method overloading is when multiple methods have the same name but different parameters.

  • Method overriding is when a subclass provides a specific implementation of a method that is already defined in its superclass.

  • Overloading is resolved at compile-time while overriding is resolved at runtime.

  • Example of overloading: public void p...read more

Asked in Infosys

5d ago

Q. Explain block size and paging in the operating system.

Ans.

Block size is the amount of data that can be stored in a single block of memory. Paging is a memory management technique used by the operating system.

  • Block size determines the amount of data that can be read or written to a storage device at once.

  • Paging divides memory into fixed-size blocks called pages.

  • When a program needs to access a page, the operating system loads it into memory.

  • This allows programs to use more memory than is physically available.

  • Examples of operating sys...read more

Asked in Infosys

3d ago

Q. Describe the approach to find the maximum XOR subset.

Ans.

Finding maximum XOR subset

  • Use Trie data structure to store binary representation of numbers

  • For each number, traverse the Trie and find the maximum XOR value

  • Repeat the above step for all numbers and return the maximum XOR value

Asked in TCS iON

2d ago

Q. You are given an integer array nums. You are initially positioned at the array's first index, and each element in the array represents your maximum jump length at that position. Determine if you can reach the l...

read more
Ans.

The task is to implement a jump game where each element specifies the maximum jump from that index.

  • Iterate through the array and keep track of the maximum reachable index at each step.

  • If the current index exceeds the maximum reachable index, return false.

  • If the loop completes without any issues, return true.

Asked in HCLTech

2d ago

Q. What is virtual memory?

Ans.

Virtual memory is a memory management technique that allows a computer to use more memory than physically available.

  • Virtual memory uses a combination of RAM and hard disk space to store data.

  • It allows multiple programs to run simultaneously without running out of memory.

  • When RAM is full, the operating system moves some data from RAM to the hard disk, freeing up space in RAM.

  • This process is called paging.

  • Virtual memory can slow down a computer if the hard disk is slow or if th...read more

Asked in Infosys

4d ago

Q. Write code to return the second largest value from two arrays.

Ans.

Code to return 2nd most value from 2 arrays of strings

  • Merge both arrays into one

  • Remove duplicates

  • Sort the array in descending order and return the second element

Asked in Infosys

2d ago

Q. Explain the Incremental Model.

Ans.

Incremental model is a software development model where the product is developed in small parts and each part is delivered incrementally.

  • The product is divided into small parts or modules.

  • Each module is developed and delivered incrementally.

  • Each increment adds new functionality to the product.

  • Testing is done after each increment is delivered.

  • Examples include Agile and Scrum methodologies.

Asked in Info Edge

4d ago

Q. Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. k is a positive integer and is less than or equal to the length of the linked list. If the number of nodes is no...

read more
Ans.

Reverse a linked list in groups of k

  • Divide the linked list into groups of k nodes

  • Reverse each group using iterative or recursive approach

  • Connect the reversed groups to form the final linked list

  • Handle edge cases like incomplete groups or empty list

  • Example: Input: 1->2->3->4->5, k=2, Output: 2->1->4->3->5

Asked in Amazon

2d ago

Q. Given an array of integers and a window of size k, find the maximum (or minimum) of each window as it slides through the array.

Ans.

Sliding Window Algorithm is used to solve problems where we need to find a substring or subarray of fixed size in a larger string or array.

  • The window size should be fixed and not change during the algorithm

  • The window should slide through the larger string or array one element at a time

  • The algorithm should keep track of the maximum or minimum value in the current window

  • Examples: Maximum Sum Subarray of Size K, Smallest Subarray with a given sum

Asked in MagicBricks

2d ago

Q. What are your weaknesses?

Ans.

One of my weaknesses is procrastination.

  • I tend to put off tasks until the last minute.

  • To overcome this, I have started using time management techniques such as the Pomodoro technique.

  • I also try to break down tasks into smaller, more manageable chunks.

  • I have found that setting deadlines for myself and holding myself accountable helps me stay on track.

Asked in Infosys

4d ago

Q. tree diagram from the data structures

Ans.

A tree diagram is a data structure that represents a hierarchical structure.

  • Nodes represent elements of the structure

  • Edges represent relationships between elements

  • Root node is the topmost node

  • Leaf nodes have no children

  • Examples include binary trees, AVL trees, and B-trees

2d ago

Q. What are the features of Python?

Ans.

Python is a high-level, interpreted programming language known for its simplicity and ease of use.

  • Python has a large standard library with built-in modules for various tasks

  • It supports multiple programming paradigms including object-oriented, functional and procedural programming

  • Python is dynamically typed and garbage-collected

  • It has a simple and easy-to-learn syntax, making it a popular choice for beginners

  • Python is widely used in web development, scientific computing, data ...read more

Asked in Infosys

3d ago

Q. Greedy Algorithm

Ans.

Greedy algorithm is a technique to make locally optimal choices at each step to find a global optimum.

  • Greedy algorithm is used in optimization problems where the goal is to find the best solution among many possible solutions.

  • It works by making the best possible choice at each step, without considering the future consequences.

  • Examples include finding the shortest path in a graph, scheduling tasks to minimize completion time, and Huffman coding.

  • Greedy algorithm may not always ...read more

Asked in Infosys

2d ago

Q. Describe a sorting technique.

Ans.

Bubble Sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order.

  • Compare each pair of adjacent elements in the array and swap them if they are in the wrong order

  • Repeat this process for each element in the array until no swaps are needed

  • Time complexity of O(n^2) makes it inefficient for large datasets

Interview Experiences of Popular Companies

Infosys Logo
3.6
 • 7.9k Interviews
View all
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories
Power Programmer 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