Add office photos
GlobalLogic logo
Engaged Employer

GlobalLogic

Verified
3.6
based on 4.5k Reviews
Video summary
Filter interviews by
Software Developer
Clear (1)

10+ GlobalLogic Software Developer Interview Questions and Answers

Updated 21 Nov 2024

Q1. Find Terms of Series Problem

Ayush is tasked with determining the first 'X' terms of the series defined by 3 * N + 2, ensuring that no term is a multiple of 4.

Input:

The first line contains a single integer 'T...read more
Ans.

Generate the first 'X' terms of a series 3 * N + 2, excluding multiples of 4.

  • Iterate through numbers starting from 1 and check if 3 * N + 2 is not a multiple of 4.

  • Keep track of the count of terms generated and stop when 'X' terms are found.

  • Return the list of 'X' terms that meet the criteria.

  • Example: For X = 4, the output should be [5, 11, 14, 17].

View 1 answer
right arrow

Q2. Reverse Array Elements

Given an array containing 'N' elements, the task is to reverse the order of all array elements and display the reversed array.

Explanation:

The elements of the given array need to be rear...read more

Ans.

Reverse the order of elements in an array and display the reversed array.

  • Iterate through the array from both ends and swap the elements until the middle is reached.

  • Use a temporary variable to store the element being swapped.

  • Print the reversed array after all elements have been swapped.

Add your answer
right arrow

Q3. Tiling Problem Statement

Given a board with 2 rows and N columns, and an infinite supply of 2x1 tiles, determine the number of distinct ways to completely cover the board using these tiles.

You can place each t...read more

Ans.

The problem involves finding the number of ways to tile a 2xN board using 2x1 tiles.

  • Use dynamic programming to solve this problem efficiently.

  • Define a recursive function to calculate the number of ways to tile the board.

  • Consider both horizontal and vertical placements of tiles.

  • Implement the function to handle large values of N using modulo arithmetic.

  • Example: For N = 4, the number of ways to tile the board is 5.

View 1 answer
right arrow

Q4. Middle of a Linked List

You are given the head node of a singly linked list. Your task is to return a pointer pointing to the middle of the linked list.

If there is an odd number of elements, return the middle ...read more

Ans.

Return the middle element of a singly linked list, or the one farther from the head if there are even elements.

  • Traverse the linked list with two pointers, one moving twice as fast as the other

  • When the fast pointer reaches the end, the slow pointer will be at the middle

  • If there are even elements, return the one that is farther from the head node

  • Handle edge cases like linked list of size 1 or empty list

Add your answer
right arrow
Discover GlobalLogic interview dos and don'ts from real experiences
Q5. What is meant by an interface in Object-Oriented Programming?
Ans.

An interface in OOP defines a contract for classes to implement, specifying methods without implementation details.

  • An interface contains method signatures without any implementation.

  • Classes can implement multiple interfaces in Java.

  • Interfaces are used to achieve abstraction and multiple inheritance in OOP.

  • Example: Java interface 'Runnable' with 'run()' method.

View 1 answer
right arrow
Q6. What is the difference between an abstract class and an interface in OOP?
Ans.

Abstract class can have both abstract and non-abstract methods, while interface can only have abstract methods.

  • Abstract class can have constructors, member variables, and methods with implementation.

  • Interface can only have abstract methods and constants.

  • A class can implement multiple interfaces but can only inherit from one abstract class.

  • Example: Abstract class - Animal with abstract method 'eat', Interface - Flyable with method 'fly'.

Add your answer
right arrow
Are these interview questions helpful?
Q7. Can you explain the SOLID principles in Object-Oriented Design?
Ans.

SOLID principles are a set of five design principles in object-oriented programming to make software designs more understandable, flexible, and maintainable.

  • S - Single Responsibility Principle: A class should have only one reason to change.

  • O - Open/Closed Principle: Software entities should be open for extension but closed for modification.

  • L - Liskov Substitution Principle: Objects of a superclass should be replaceable with objects of its subclasses without affecting the func...read more

Add your answer
right arrow
Q8. What do you mean by virtual functions in C++?
Ans.

Virtual functions in C++ allow a function to be overridden in a derived class, enabling polymorphic behavior.

  • Virtual functions are declared in a base class with the 'virtual' keyword.

  • They are overridden in derived classes to provide specific implementations.

  • Virtual functions enable polymorphism, allowing objects of different derived classes to be treated as objects of the base class.

  • Example: class Animal { virtual void makeSound() { cout << 'Animal sound'; } }; class Dog : pu...read more

Add your answer
right arrow
Share interview questions and help millions of jobseekers 🌟
man with laptop
Q9. Can you explain piping in Unix/Linux?
Ans.

Piping in Unix/Linux allows output of one command to be used as input for another command.

  • Piping is done using the | symbol in Unix/Linux.

  • It allows for the output of one command to be directly used as input for another command.

  • Piping can be used to chain multiple commands together to perform complex operations.

  • Example: ls -l | grep 'txt' - This command lists files in long format and then filters for files with 'txt' in their name.

Add your answer
right arrow
Q10. What is dependency injection?
Ans.

Dependency injection is a design pattern in which components are given their dependencies rather than creating them internally.

  • Dependency injection helps in achieving loose coupling between classes.

  • It allows for easier testing by providing a way to mock dependencies.

  • There are three types of dependency injection - constructor injection, setter injection, and interface injection.

  • Example: In a Java application, a service class can be injected with a DAO interface implementation ...read more

Add your answer
right arrow

Q11. what is java ? why globalogiv etc

Ans.

Java is a popular programming language used for developing a wide range of applications.

  • Java is an object-oriented language known for its platform independence.

  • It is used for developing web applications, mobile apps, enterprise software, and more.

  • Java is widely used in the industry due to its robustness, security, and scalability.

  • Globalogiv is likely a typo or a specific term related to a particular project or company.

  • Java has a large community of developers and extensive lib...read more

Add your answer
right arrow

Q12. write a code for finding length of string

Ans.

Code to find the length of a string in an array of strings

  • Iterate through each string in the array and use the length property to find the length of each string

  • Store the length of each string in a separate array or print it out directly

Add your answer
right arrow

Q13. what is stack with an example

Ans.

A stack is a data structure that follows the Last In First Out (LIFO) principle.

  • Elements are added and removed from the top of the stack.

  • Common operations include push (add element) and pop (remove element).

  • Example: Undo functionality in a text editor.

Add your answer
right arrow

Q14. difference between comparator and comparison

Ans.

Comparator is an interface used to compare objects, while comparison is the act of comparing two or more objects.

  • Comparator is an interface in Java used to define custom sorting logic for objects.

  • Comparison is the process of evaluating the similarities and differences between two or more objects.

  • Comparator is used in sorting algorithms like Collections.sort() to define the sorting order.

  • Comparison is a general term used in various contexts to determine the relationship betwee...read more

Add your answer
right arrow

Q15. Write a program for fibonacchi series?

Ans.

Program to generate Fibonacci series using iterative approach.

  • Initialize variables for first two numbers in series

  • Use a loop to calculate and print next numbers in series

  • Repeat until desired number of terms is reached

Add your answer
right arrow

Q16. implement run time polymorphism

Ans.

Run time polymorphism is achieved in object-oriented programming by using virtual functions and pointers.

  • Use base class with virtual functions

  • Create derived classes that override the virtual functions

  • Use pointers of base class type to store objects of derived classes

  • Call the virtual functions through the base class pointers to achieve polymorphism

Add your answer
right arrow

Q17. Explain react life cycle components

Ans.

React life cycle components are methods that are automatically called at different stages of a component's life cycle.

  • Mounting: constructor, render, componentDidMount

  • Updating: render, componentDidUpdate

  • Unmounting: componentWillUnmount

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

Interview Process at GlobalLogic Software Developer

based on 18 interviews
3 Interview rounds
Technical Round - 1
Technical Round - 2
HR Round
View more
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Developer Interview Questions from Similar Companies

TCS Logo
3.7
 • 243 Interview Questions
NetApp Logo
3.9
 • 38 Interview Questions
LinkedIn  Logo
4.3
 • 36 Interview Questions
View all
Recently Viewed
INTERVIEWS
Data Entry
10 top interview questions
JOBS
Salesforce
No Jobs
JOBS
Oracle
No Jobs
SALARIES
Atos
INTERVIEWS
LinkedIn
30 top interview questions
COMPANY BENEFITS
Atos
No Benefits
SALARIES
Atos
JOBS
Oracle
No Jobs
REVIEWS
Atos
No Reviews
INTERVIEWS
Cognizant
100 top interview questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
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