Add office photos
Employer?
Claim Account for FREE

PayPal

3.9
based on 920 Reviews
Video summary
Filter interviews by

10+ Geeco Enercon Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. Reverse the String Problem Statement

You are given a string STR which contains alphabets, numbers, and special characters. Your task is to reverse the string.

Example:

Input:
STR = "abcde"
Output:
"edcba"

Input...read more

Ans.

Reverse a given string containing alphabets, numbers, and special characters.

  • Iterate through the string from the end to the beginning and append each character to a new string.

  • Use built-in functions like reverse() or slicing to reverse the string.

  • Handle special characters and numbers while reversing the string.

  • Ensure to consider the constraints on the input string length and number of test cases.

Add your answer

Q2. One Away Transformation Problem

Given two strings, A and B, determine whether A can be transformed into B by performing at most one of the following operations (including zero operations):

1. Delete a character...read more
Ans.

Determine if one string can be transformed into another by performing at most one operation (insert, delete, replace).

  • Iterate through both strings simultaneously and check for differences.

  • Handle cases where a character needs to be inserted, deleted, or replaced.

  • Keep track of the number of operations performed and ensure it does not exceed one.

Add your answer

Q3. Remove Duplicates from String Problem Statement

You are provided a string STR of length N, consisting solely of lowercase English letters.

Your task is to remove all duplicate occurrences of characters in the s...read more

Ans.

Remove duplicate occurrences of characters in a given string.

  • Use a hash set to keep track of characters seen so far.

  • Iterate through the string and add non-duplicate characters to a new string.

  • Return the new string without duplicate characters.

Add your answer

Q4. Dijkstra's Shortest Path Problem

Given an undirected graph with ‘V’ vertices (labeled 0, 1, ... , V-1) and ‘E’ edges, where each edge has a weight representing the distance between two connected nodes (X, Y).

Y...read more

Ans.

Dijkstra's algorithm is used to find the shortest path from a source node to all other nodes in a graph with weighted edges.

  • Implement Dijkstra's algorithm to find the shortest path distances from the source node to all other nodes.

  • Use a priority queue to efficiently select the next node with the shortest distance.

  • Update the distances of neighboring nodes based on the current node's distance and edge weights.

  • Handle disconnected vertices by assigning a large value (e.g., 214748...read more

Add your answer
Discover Geeco Enercon interview dos and don'ts from real experiences
Q5. What is the difference between Stack and Heap in the context of Object-Oriented Programming (OOPS)?
Ans.

Stack is used for static memory allocation and stores local variables, while Heap is used for dynamic memory allocation and stores objects.

  • Stack is faster than Heap as it has a fixed size and memory allocation is done at compile time.

  • Heap is slower than Stack as memory allocation is done at runtime and requires more complex management.

  • Stack memory is limited and typically smaller in size, while Heap memory is larger and can grow as needed.

  • Objects in OOP are typically stored i...read more

Add your answer
Q6. You have two hourglasses, one measuring 7 minutes and the other measuring 11 minutes. How can you measure exactly 15 minutes using only these hourglasses?
Ans.

To measure exactly 15 minutes using two hourglasses of 7 and 11 minutes, start both hourglasses together and then flip the 7-minute hourglass when it runs out.

  • Start both hourglasses at the same time.

  • When the 7-minute hourglass runs out, flip it immediately.

  • When the 11-minute hourglass runs out, 4 minutes will have passed on the 7-minute hourglass. This gives a total of 15 minutes.

Add your answer
Q7. Write a query to find the nth highest salary from a database.
Ans.

Query to find the nth highest salary from a database

  • Use the ORDER BY clause to sort salaries in descending order

  • Use the LIMIT clause to select the nth highest salary

  • Consider handling cases where there may be ties for the nth highest salary

Add your answer
Q8. What is the difference between malloc and new?
Ans.

malloc is a function in C for dynamic memory allocation, while new is an operator in C++ for dynamic memory allocation and object creation.

  • malloc is a function in C, while new is an operator in C++.

  • malloc returns a void pointer, while new returns a pointer to the type being allocated.

  • malloc does not call constructors, while new calls constructors for object initialization.

  • malloc requires manual memory deallocation with free, while new automatically calls the destructor and de...read more

Add your answer
Q9. What is the difference between C and C++?
Ans.

C is a procedural programming language while C++ is an object-oriented programming language with features like classes and inheritance.

  • C is a procedural programming language, while C++ is a multi-paradigm language with support for object-oriented programming.

  • C does not support classes and objects, while C++ does.

  • C does not have features like inheritance and polymorphism, which are present in C++.

  • C is a subset of C++, meaning that C++ includes all of C's features and adds new ...read more

Add your answer
Q10. What is a virtual function?
Ans.

A virtual function is a function in a base class that is declared using the keyword 'virtual' and can be overridden by a function with the same signature in a derived class.

  • Virtual functions allow for dynamic polymorphism in C++

  • They are used in inheritance to achieve runtime polymorphism

  • Example: virtual void display() = 0; in a base class and void display() override in a derived class

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Geeco Enercon

based on 1 interviews
Interview experience
3.0
Average
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Developer Intern Interview Questions from Similar Companies

4.1
 • 188 Interview Questions
3.9
 • 22 Interview Questions
3.6
 • 14 Interview Questions
3.7
 • 12 Interview Questions
3.8
 • 12 Interview Questions
1.9
 • 11 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

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

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter