GE interview questions

107 questions from 16 interviews · updated from reports 2016-2024

Practise GE-style

About

GE, historically General Electric, is an industrial company whose businesses have included aerospace, power, renewable energy, and related digital services. In India, it is known for hiring software engineers, digital technology interns, business interns, and engineering interns for technology, data, and operations teams.

The roles that come up most are Software Engineer, GE Renewables & Power DT Business Intern and Intern. This covers 16 candidate interviews reported from 2016 to 2024. Most sat it at entry level (11 of 16 that recorded a level), with 5 internship interviews alongside. Among the 14 that recorded either route, arrivals split between campus drives (14, 100%). Most questions fall under DSA and CS fundamentals.

Category
Difficulty
Round

Interview questions

Q. Find the maximum sum of array elements such that no two chosen elements are adjacent.

asked 2xmediumDynamic programmingOnline test2016-2017

Ans. Use dynamic programming: for each element, the best sum is the maximum of skipping it or taking it plus the best sum up to two positions before. Keep only two variables, previous best and best before previous, so no array is needed. This runs in O(n) time and O(1) space.

Q. Find the smallest permutation of a given number considering both negative and positive numbers.

asked 2xmediumSortingOnline test2017

Ans. For a positive number, arrange digits in ascending order but put the first non-zero digit before any zeros. For a negative number, arrange its digits in descending order and keep the minus sign, because the largest absolute value gives the smallest number. Use a digit array or frequency count. Time complexity is O(d log d), or O(d) with counting.

Q. Given an array of size n and a number k, sort the first k elements in non-decreasing order and the last n-k elements in non-increasing order.

asked 2xmediumArraysOnline test2017

Ans. Sort the subarray from index 0 to k minus 1 in non-decreasing order, then sort the subarray from index k to n minus 1 in non-increasing order. Use any comparison sort on both ranges, reversing the second range if needed. The time complexity is O(k log k + (n-k) log(n-k)), with constant extra space if done in place.

Q. Print all prime numbers in the range [2, N].

asked 2xeasyMathOnline test2017

Ans. Use the Sieve of Eratosthenes to print all primes from 2 to N. Create a boolean array of size N plus 1, initially marking numbers as prime, then for each prime p up to square root of N, mark multiples of p as non-prime. Finally print remaining marked numbers. Time complexity is O(N log log N).

Q. Given a string, remove all vowels and return the resulting string.

asked 2xeasyStringsOnline test2017

Ans. Scan the string once, keep each character that is not a vowel, and return the joined result. Use a set containing a, e, i, o, u, and usually their uppercase forms, for constant time checks. This takes O(n) time and O(n) extra space for the output.

Q. Which data structures are used in TCP/IP?

asked 1xmediumNetworkingTechnical2016

Ans. TCP/IP implementations mainly use queues and buffers for packets, tables for routing and ARP, and protocol control blocks for connection state. TCP also uses send and receive buffers with sliding window tracking, often implemented with ordered queues. The key point is that networking relies heavily on queues for flow and tables for fast lookup.

Q. What is segmentation in operating systems?

asked 1xmediumOperating systemsTechnical2017

Ans. Segmentation is a memory management scheme where a process is divided into variable-sized logical parts, such as code, data, stack and heap. Each logical address contains a segment number and an offset, which are checked against a segment table. It supports protection and sharing, but can suffer from external fragmentation.

Q. Find the next permutation of a given number.

asked 1xmediumArraysOnline test2017

Ans. Scan the digits from right to left to find the first digit smaller than the digit after it. Then find the smallest larger digit to its right, swap them, and reverse the suffix after the swapped position. If no such digit exists, the number is already the largest permutation. This runs in linear time.

Q. Compute the next permutation of a given number.

asked 1xmediumArraysOnline test2017

Ans. Scan the digits from right to left to find the first digit smaller than the digit after it. Swap it with the smallest larger digit to its right, then reverse the suffix after its original position. If no such digit exists, there is no larger permutation. Use an array of digits, in O(n) time.

Q. Explain storage classes extern and register in C.

asked 1xmediumC basicsTechnical2017

Ans. extern declares a variable or function that is defined elsewhere, usually with external linkage, so multiple files can refer to the same object. register requests that a local variable be stored in a CPU register for faster access. The compiler may ignore register, and you cannot take the address of a register variable.

Q. Explain function overloading and operator overloading.

asked 1xmediumOOPTechnical2017

Ans. Function overloading means defining multiple functions with the same name but different parameter lists, so the compiler chooses the right one from the arguments. Operator overloading means giving an existing operator a type-specific meaning for user-defined types, such as adding two complex numbers. The key rule is that signatures or operand types must differ.

Q. What are the different storage classes in C? Explain each.

asked 1xmediumOOPTechnical2017

Ans. C has four common storage classes: auto, register, static and extern. auto is the default for local variables with block scope and automatic lifetime. register suggests storing a variable in a CPU register. static preserves a variable for the whole program or gives internal linkage. extern declares a variable or function defined elsewhere.

Q. What is a template class in C++ and how is it implemented?

asked 1xmediumOOPTechnical2017

Ans. A template class in C++ is a generic class written with one or more type or value parameters, so the same class logic can work with different data types. It is implemented using the template keyword before the class definition. The compiler generates concrete class versions when the template is used, so definitions are usually kept in headers.

Q. Write an SQL query involving joins and explain how joins work.

asked 1xmediumSQLTechnical2017

Ans. Use an inner join to return customers with matching orders, selecting customer name from the customers table and order id from the orders table where customers.id equals orders.customer_id. A join combines rows from tables using a related key. Inner joins keep matches only, while left joins keep all left table rows.

Q. Given integers S, M, and N, compute ((S^M) % 10)^N % 1000000007.

asked 1xmediumMathOnline test2017

Ans. Compute d = S^M mod 10, then compute d^N mod 1000000007 using fast modular exponentiation. The key detail is not to calculate S^M directly; reduce it modulo 10 first. This takes O(log M + log N) time and O(1) space.

Q. Explain the difference between DFS and BFS and write code for them

asked 1xmediumGraphsTechnical2017

Ans. DFS explores as far as possible along one path before backtracking, while BFS explores all neighbours level by level. DFS uses recursion or a stack; BFS uses a queue. Both mark visited nodes to avoid repeats. For a graph with V vertices and E edges, both run in O(V + E) time.

Q. Explain different memory management techniques in operating systems

asked 1xmediumOperating systemsTechnical2017

Ans. Operating systems manage memory using fixed or variable partitioning, paging, segmentation, virtual memory, swapping, and allocation algorithms. Paging divides memory into equal-size frames and avoids external fragmentation, while segmentation matches logical program parts but can fragment. Virtual memory maps logical addresses to physical memory and moves inactive pages to disk when needed.

Q. Find a triplet in an array whose product is equal to a given number.

asked 1xmediumArraysOnline test2019

Ans. Use a hash set while fixing one element and scanning the rest for a matching third value. For each fixed index, keep seen values from the inner scan; if target is divisible by the current pair product and the quotient is seen, return the triplet. Handle target zero separately. Time is O(n²), space is O(n).

Q. Check whether a given binary tree is a subtree of another binary tree.

asked 1xmediumTreesOnline test2020

Ans. Check each node of the larger tree as a possible match root, and for each one test whether the two trees are identical in value and structure. Use DFS recursion for both traversal and comparison. The simple solution is O(nm) in the worst case, where n and m are the tree sizes.

Q. Explain how static polymorphism and runtime polymorphism are implemented.

asked 1xmediumOOPTechnical2017

Ans. Static polymorphism is implemented by resolving calls at compile time, typically through function overloading, operator overloading, generics or templates. Runtime polymorphism is implemented by resolving calls at execution time, usually through inheritance and virtual methods. The key mechanism is dynamic dispatch, often using a vtable to call the actual object’s overridden method.

Q. Find the non-repeating elements in an array without using additional space.

asked 1xmediumArraysTechnical2016

Ans. Sort the array in place, then scan it and print elements whose neighbours are different. For each position, compare with the previous and next value, handling the first and last elements separately. This uses O(1) extra space if the sort is in place, and takes O(n log n) time.

Q. Predict the output of C/C++ programs involving pointers and bit manipulation

asked 1xmediumOOPOnline test2017

Ans. The output depends on the exact program, so I would trace pointer addresses, dereferencing, array decay, operator precedence, and bitwise operations step by step. The key detail is to watch for undefined behaviour, such as invalid pointer access, modifying a variable multiple times between sequence points, or shifting by an invalid amount.

Q. Explain semaphores, threads, deadlocks, and real-time applications of threads.

asked 1xmediumOperating systemsTechnical2016

Ans. Semaphores control access to shared resources, threads are lightweight execution units within a process, deadlocks occur when threads wait forever for each other’s resources, and real-time thread applications include games, operating systems, trading systems, robotics, and multimedia. The key concern is synchronisation, so shared data must be protected without creating circular waits.

Q. Suggest an additional feature for Facebook and explain its system architecture.

asked 1xmediumProduct designTechnical2017

Ans. I would add a “trusted local help” feature that matches users needing short-term help with verified nearby volunteers. The architecture would use mobile clients, an API gateway, user and verification services, a location-indexed matching service, chat, notifications, and moderation. The key detail is privacy: exact locations are hidden until both sides accept.

Q. Convert a binary tree into a Sum Tree and count the number of even-valued nodes.

asked 1xmediumTreesOnline test2019

Ans. Use a postorder DFS: for each node, first process its left and right children, set the node’s value to the sum of their original subtree values, then count it if the new value is even. The recursion returns the original sum including the old node value. Time is O(n), stack space is O(h).

Q. Explain balanced binary trees and perform insertion and deletion in an AVL tree.

asked 1xmediumTreesTechnical2017

Ans. A balanced binary tree keeps subtree heights close so operations stay logarithmic. An AVL tree maintains balance factor height(left) minus height(right) as -1, 0, or 1. Insert or delete as in a BST, update heights while returning upward, then fix imbalance using LL, RR, LR, or RL rotations. Time complexity is O(log n).

Q. How is the string class implemented in C++ and how does it differ from char* in C?

asked 1xmediumOOPTechnical2017

Ans. C++ std::string is a class that manages a dynamic character buffer, usually storing its size, capacity and allocator, and freeing memory automatically. Unlike C char*, it knows its length, supports resizing and copying safely, and provides member functions. A char* is only a raw pointer, usually relying on a null terminator.

Q. Explain various HTTP methods, their uses, differences, and provide sample use cases.

asked 1xmediumNetworkingTechnical2019

Ans. HTTP methods define the intended action on a resource: GET reads, POST creates or submits, PUT replaces, PATCH partially updates, DELETE removes, HEAD fetches headers only, and OPTIONS discovers supported operations. The key differences are safety and idempotency: GET is safe, PUT and DELETE are idempotent, while POST usually is not.

Q. Given an integer S and integers M and N, find the value of ((S^M) % 10)^N % 1000000007.

asked 1xmediumMathOnline test2017

Ans. Compute d = (S^M) mod 10 using the repeating cycle of the last digit, then return d^N mod 1000000007 using fast modular exponentiation. The only important detail is that last digits repeat with period at most 4, so reduce M by the cycle length before finding d. Time complexity is O(log N).

Q. What new feature would you implement in WhatsApp, and how would you design its architecture?

asked 1xmediumProduct designTechnical2017

Ans. I would add scheduled messages, designed so WhatsApp servers store only encrypted payloads and delivery metadata. The client encrypts the message, uploads it with recipient IDs and send time, and a scheduler service triggers delivery through existing queues. The key detail is preserving end-to-end encryption while making scheduling reliable across offline clients.

Q. Given an integer N, generate the smallest possible permutation of its digits (unlocking key).

asked 1xmediumStringsOnline test2017

Ans. Sort the digits to form the smallest number, but do not allow a leading zero. Count each digit from 0 to 9, place the smallest non-zero digit first, then all zeroes, then the remaining digits in ascending order. A frequency array is best. Time complexity is O(d), where d is the number of digits.

Q. Discuss the impact of Internet of Things (IoT) in our daily life, covering both pros and cons.

asked 1xmediumCommunicationGroup discussion2019

Ans. A strong answer should use everyday examples, such as smart homes, wearables, connected cars or healthcare devices. Emphasise benefits like convenience, efficiency, safety, better monitoring and cost savings. Balance this with concerns about privacy, security, data misuse, dependency, compatibility and e-waste. Interviewers listen for balanced judgement and practical awareness.

Q. How are threads implemented in Java and why do we need the Thread class or Runnable interface?

asked 1xmediumOperating systemsTechnical2017

Ans. Java threads are implemented by the JVM, usually by mapping each Java Thread to a native operating system thread. We need the Thread class to represent and control a thread of execution, and Runnable to define the task separately. Calling start creates a new call stack and runs the Runnable’s run method.

Q. Find all nodes at the maximum depth in a binary tree where all nodes are present at that depth.

asked 1xmediumTreesTechnical2017

Ans. Use level order traversal and return the nodes from the last level visited. Keep a queue, process the tree level by level, and replace the current result with the nodes from each level. When traversal ends, the result contains all nodes at maximum depth. This takes O(n) time and O(w) space.

Q. What is normalization in DBMS and why is it required? Explain First, Second, and Third Normal Forms.

asked 1xmediumDBMSTechnical2017

Ans. Normalization is the process of organising database tables to reduce duplicate data and avoid update, insert, and delete anomalies. It improves consistency and integrity. First Normal Form requires atomic values and no repeating groups. Second Normal Form removes partial dependency on part of a composite key. Third Normal Form removes transitive dependencies between non-key attributes.

Q. Given different coin denominations, find the minimum number of coins required to make a given amount.

asked 1xmediumDynamic programmingOnline test2020

Ans. Use dynamic programming to compute the minimum coins for every value from 0 to the target amount. Keep an array dp where dp[0] is 0 and other entries start as infinity. For each amount, try every coin and update dp[value] = min(dp[value], dp[value - coin] + 1). Time is O(coins * amount), space is O(amount).

Q. Explain OOP concepts such as inheritance, polymorphism, function overloading, and function overriding.

asked 1xmediumOOPTechnical2019

Ans. Inheritance lets a class reuse and extend another class, polymorphism lets the same interface behave differently for different types, overloading defines multiple functions with the same name but different parameters, and overriding replaces a parent class method in a child class. The key idea is modelling shared behaviour while allowing specialised behaviour.

Q. Check if a binary tree is a subtree of another binary tree and return the number of nodes in the subtree.

asked 1xmediumTreesOnline test2020

Ans. Traverse the main tree and, at each node, check whether the tree rooted there is identical to the given subtree; if identical, return the node count of that subtree, otherwise continue searching. Use recursive DFS for traversal, recursive equality checking, and a recursive count. Time complexity is O(nm) in the worst case.

Q. Explain OOP concepts such as inheritance, polymorphism, data abstraction, and data encapsulation in Java and C++.

asked 1xmediumOOPTechnical2017

Ans. Inheritance lets classes reuse and specialise behaviour, polymorphism lets the same interface call different implementations, abstraction exposes essential operations, and encapsulation hides internal state. In Java these are mainly through classes, interfaces, overriding, and access modifiers. In C++, they use classes, virtual functions, abstract classes, and public, protected, or private members.

Q. Solve the Subset Sum problem: determine whether there exists a subset of a given set with sum equal to a given value.

asked 1xmediumDynamic programmingOnline test2016

Ans. Use dynamic programming to track which sums are reachable. Create a boolean array of size target plus one, set sum zero as true, then for each number update the array backwards so each value is used at most once. The answer is whether target becomes true. Time is O(n target), space is O(target).

Q. Write code to demonstrate OOPS concepts such as inheritance, function overloading, and data hiding using access specifiers

asked 1xmediumOOPTechnical2020

Ans. Create a base class such as Employee with private salary, protected name, and public methods, then derive Manager from it and overload a display method with different parameters. This demonstrates data hiding through private access, inheritance through subclassing, and function overloading through same-name methods. It uses objects and classes, with constant time method calls.

Q. Given a boolean matrix, modify it such that if a cell contains 1, all cells in its corresponding row and column are set to 1.

asked 1xmediumArraysOnline test2020

Ans. Scan the matrix first and record which rows and columns originally contain a 1, then scan again and set a cell to 1 if its row or column was recorded. Use two boolean arrays for rows and columns. This avoids newly written 1s causing extra changes. Time is O(mn), space is O(m + n).

Q. Design a database schema for a system with customers, products, and orders. Define tables, relationships, and draw the ER diagram.

asked 1xmediumDb designTechnical2017

Ans. Use Customers, Products, Orders, and OrderItems tables, with OrderItems resolving the many-to-many relationship between orders and products. Customers have many Orders; Orders have many OrderItems; Products have many OrderItems. ER: Customer 1 to many Order, Order 1 to many OrderItem, Product 1 to many OrderItem. Store price at purchase in OrderItems.

Q. Write a program to rearrange an array such that all negative numbers appear before positive numbers while maintaining their relative order.

asked 1xmediumArraysTechnical2019

Ans. Use a stable partition by scanning the array once and writing all negative numbers to a temporary array, then scanning again and writing all non-negative numbers. Copy the temporary array back to the original. This preserves relative order within both groups, takes O(n) time, and uses O(n) extra space.

Q. Design a cab booking system like Ola that allows users to book a cab, search nearby cabs, and estimate the time for a cab to reach the user.

asked 1xmediumScalable systemsTechnical2016

Ans. Build services for riders, drivers, location, matching, booking, pricing and notifications, backed by a transactional store for trips and a fast geo index for live driver locations. Drivers stream GPS updates; nearby search uses geohash or S2 cells in Redis. ETA comes from distance, road traffic and driver availability, then booking locks one driver atomically.

Q. How can you determine the length of an integer array if only a pointer to the head of the array is given? How is it determined in case of strings?

asked 1xmediumMemoryTechnical2017

Ans. You cannot determine the length of an integer array from only a pointer to its first element. The pointer contains an address, not size information, so the length must be stored or passed separately. For C-style strings, the length is found by scanning until the terminating null character, so it takes linear time.

Q. How would you design a system to manage the state of objects in an application that requires frequent read and write operations, ensuring thread safety?

asked 1xmediumOOPTechnical2024

Ans. Use a thread-safe state store, typically a concurrent hash map keyed by object ID, with immutable value objects and atomic replace operations for updates. For read-heavy workloads, use read-write locks or copy-on-write snapshots. The key detail is to keep critical sections small so correctness is maintained without blocking unrelated reads and writes.

Q. Rearrange an array such that all odd numbers occupy odd positions and even numbers occupy even positions, maintaining the order of numbers without using extra space.

asked 1xmediumArraysOnline test2016

Ans. Use a stable in-place rearrangement: scan indices, and when a position has the wrong parity, find the next later element with the required parity and right-rotate that segment by one. This preserves relative order and uses no extra array. It is possible only if odd and even counts fit the required positions. Time is O(n²).

Q. Given a string with numbers, '#', underscores, and dots, convert numbers to characters (A=1 to Z=26) unless preceded by '#', replace underscores with spaces, remove spaces, and keep dots unchanged. Example input: "1 20 3.# 20_# 1" → output "ATC.20 1".

asked 1xmediumStringsOnline test2016

Ans. Scan left to right, tokenising consecutive digits and treating # as a flag for the next number: if flagged, append the digits unchanged; otherwise map 1 to 26 to A to Z. Append underscores as spaces, keep dots, ignore ordinary spaces and omit #. Use a string builder. Time is O(n), space is O(n).

Q. Write code to find the middle node of a linked list in the most efficient way.

asked 1xhardLinked listsTechnical2016

Ans. Use two pointers: move a slow pointer one node at a time and a fast pointer two nodes at a time until the fast pointer reaches the end. The slow pointer will then be at the middle node. This uses the linked list itself, runs in O(n) time, and uses O(1) extra space.

Q. How is free() implemented when only a pointer to memory is passed and not the length of allocated memory?

asked 1xhardOperating systemsTechnical2017

Ans. free() finds the allocation size from metadata stored by the allocator, usually in a header just before the pointer returned by malloc(). When malloc() allocates memory, it reserves extra space for bookkeeping such as block size and status. free() uses pointer arithmetic to locate that metadata, then marks or merges the block as free.

Q. Rearrange an array so that odd numbers occupy odd positions and even numbers occupy even positions while maintaining relative order and without using extra space.

asked 1xhardArraysOnline test2017

Ans. Use an in-place stable rotation approach: scan positions, and whenever a position has the wrong parity, find the next element of the needed parity and right-rotate that segment by one. This preserves relative order and uses O(1) extra space. Time complexity is O(n²). It is possible only if parity counts fit the required positions.

Q. What do you mean by DBMS?

asked 1xeasyDBMSTechnical2017

Ans. A DBMS, or Database Management System, is software used to create, store, organise, retrieve, and manage data in a database. It provides an interface between users or applications and the data, while handling important tasks such as security, consistency, backup, recovery, and controlled access to shared information.

Q. Find the height of a binary tree.

asked 1xeasyTreesTechnical2016

Ans. Find the height by doing a depth first traversal and returning 1 plus the maximum height of the left and right subtrees. Use recursion, or an explicit stack if recursion depth is a concern. With height measured in nodes, an empty tree has height 0 and a leaf has height 1. Time is O(n).

Q. Explain exception handling in Java.

asked 1xeasyOOPTechnical2019

Ans. Exception handling in Java is a mechanism for dealing with runtime errors without abruptly stopping normal program flow. Risky code is placed in a try block, errors are handled in catch blocks, and cleanup goes in finally. Java has checked exceptions, which must be caught or declared, and unchecked exceptions.

Q. Reverse all words in a given string.

asked 1xeasyStringsTechnical2017

Ans. Reverse the order of the words by splitting the string into words, then joining them back in reverse order. Use an array or list to store the words, ignoring extra spaces if required. This takes O(n) time because each character is processed once, and O(n) extra space for the word list.

Q. Print all prime numbers less than 100

asked 1xeasyMathTechnical2020

Ans. The prime numbers less than 100 are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89 and 97. Check each number for divisibility only up to its square root for efficiency.

Q. Explain different normal forms in DBMS

asked 1xeasyDBMSTechnical2020

Ans. Normal forms are rules for designing relational tables to reduce redundancy and avoid update, insert and delete anomalies. 1NF requires atomic values, 2NF removes partial dependency on a composite key, 3NF removes transitive dependency, and BCNF requires every determinant to be a candidate key. Higher forms handle multivalued and join dependencies.

Q. Digital India: Boon or Bane?

asked 1xunknownVerbalGroup discussion2017

Ans. A strong answer takes a balanced view and calls Digital India largely a boon, with conditions. Pick examples like UPI, online services, telemedicine, education, or rural access. Emphasise inclusion, efficiency, transparency, and economic growth, but acknowledge privacy, cyber fraud, misinformation, and the digital divide. Interviewers listen for maturity, balance, and practical awareness.

Q. Will AI replace the human workforce?

asked 1xunknownCommunicationGroup discussion2017

Ans. A strong answer should take a balanced view: AI will replace some tasks, not the whole workforce. Pick an example from your industry where automation changed roles, then emphasise adaptability, judgement, ethics and human collaboration. Interviewers listen for realism, curiosity, willingness to learn and no fear-based or dismissive thinking.

Showing 60 of 107 questions. Ranked by how often the same question came back across interviews.

Practise a GE-style interview

A spoken interview built from these questions, scored when you finish; the feedback is yours.

Start practising

When you are ready, record The One: a single interview hiring teams watch, so you stop repeating first rounds.

Common questions

What questions does GE ask?

Candidate interviews most often cover DSA (46%) and CS fundamentals (43%).

How many rounds does GE interview have?

Candidate interviews show an average of 3.8 rounds per experience, with a typical sequence of Online test → Group discussion → Technical → HR. Individual interview paths can vary.

Is the GE interview hard?

Among questions with a recorded difficulty, the mix is easy 50%, medium 47%, hard 3%.