CGI Group
40+ Deel Interview Questions and Answers
Ninja has been given a program to do basic string compression. For a character that is consecutively repeated more than once, he needs to replace the consecutive duplicate occurrences with th...read more
What are the various access specifiers in Java?
How many types of memory areas are allocated by JVM?
Q4. 1,Diff bwn aggregation and composition? 2,w a p to print fibnoci sries? with recursion? 3,Diff bwn interface and abstract? 4,w ap to print * patteren? * ** *** **** 5,Explain custom immutable class? 6,what is i...
read moreThis JSON contains answers to interview questions for a Software Engineer position.
Aggregation and composition are both forms of association in object-oriented programming.
Aggregation represents a 'has-a' relationship, where one object contains another object as a part.
Composition is a stronger form of aggregation, where the lifetime of the contained object is controlled by the container object.
Fibonacci series can be printed using recursion by defining a recursive function t...read more
What are the types of design patterns in Java?
What is the purpose of using @ComponentScan in the class files?
What do you know about JIT compiler?
What Are the Basic Annotations that Spring Boot Offers?
What do you mean by data encapsulation?
What is dependency Injection?
Q11. how can you improve performance of your spring boot application
To improve performance of a Spring Boot application, consider optimizing database queries, caching, using asynchronous processing, and monitoring performance metrics.
Optimize database queries by using indexes, avoiding N+1 queries, and limiting the amount of data fetched.
Implement caching to store frequently accessed data in memory, reducing the need to fetch data from the database repeatedly.
Use asynchronous processing for time-consuming tasks to free up resources and improv...read more
Q12. how did you implement logging in your springboot application
Implemented logging in Spring Boot application using SLF4J and Logback
Added dependencies for SLF4J and Logback in pom.xml
Configured logback.xml for logging levels and appenders
Injected Logger instances using @Autowired annotation in classes
Used logger.debug(), logger.info(), logger.error() methods for logging
Difference between Abstract class and Interface.
Q14. Write a code to find Number of occurrences of a word in a string
Code to find number of occurrences of a word in a string
Split the string into an array of words
Loop through the array and count the occurrences of the given word
Q15. Singleton can be broken by cloning, how to prevent it?
To prevent Singleton from being broken by cloning, we can override the clone method and throw an exception.
Override the clone method in the Singleton class and throw an exception to prevent cloning.
Alternatively, you can return the same instance in the clone method instead of creating a new instance.
Use serialization and deserialization to create a new instance of the Singleton class.
Q16. When a function is passed as an argument to another function. Then it is a callback function
Yes, a callback function is a function that is passed as an argument to another function.
Callback functions are commonly used in event handling, asynchronous programming, and functional programming.
Example: setTimeout(function() { console.log('Hello!'); }, 1000);
Example: array.map(function(item) { return item * 2; });
Q17. what is oop concept, difference b/w interface and abstract class
OOP concept focuses on creating objects that interact with each other. Interface is a contract for classes to implement, while abstract class can have some implemented methods.
OOP concept involves creating objects that have properties and methods to interact with each other
Interface is a contract that defines a set of methods that a class must implement
Abstract class can have some implemented methods along with abstract methods that must be implemented by subclasses
Q18. name two design pattern used in project
Two common design patterns used in projects are Singleton and Observer patterns.
Singleton pattern ensures a class has only one instance and provides a global point of access to it.
Observer pattern defines a one-to-many dependency between objects so that when one object changes state, all its dependents are notified and updated automatically.
Q19. What is a vector how is it different from array
A vector is a dynamic array that can resize itself, while an array has a fixed size.
Vectors can grow or shrink in size dynamically, while arrays have a fixed size.
Vectors can easily insert or remove elements at any position, while arrays require shifting elements.
Vectors provide bounds checking and can be passed by value, while arrays cannot.
Example: vector
names = {"Alice", "Bob", "Charlie"};
Q20. Unique and primary key Clustered vs non cluster index Store proc
The question covers database concepts like unique and primary keys, clustered and non-clustered indexes, and stored procedures.
A unique key is a column or set of columns that uniquely identifies each row in a table.
A primary key is a unique key that also enforces data integrity rules.
A clustered index determines the physical order of data in a table, while a non-clustered index does not.
Stored procedures are precompiled SQL statements that can be executed multiple times.
Q21. Diff between Rest Controller & Controller?
Rest Controller is used for RESTful web services while Controller is used for general web applications.
Rest Controller is used for creating RESTful web services that can consume and produce JSON, XML, etc.
Controller is used for general web applications that render views and handle form submissions.
Rest Controller uses @RestController annotation while Controller uses @Controller annotation.
Rest Controller methods return data directly while Controller methods return ModelAndVie...read more
Q22. What is polymorphism and examples of it
Polymorphism is the ability of an object to take on many forms. It allows objects of different classes to be treated as if they were of the same class.
Polymorphism can be achieved through method overloading and method overriding
Method overloading is when multiple methods have the same name but different parameters
Method overriding is when a subclass provides its own implementation of a method that is already defined in its superclass
An example of polymorphism is the use of a ...read more
Q23. Parent and child class in Java Constructor overloading
Parent and child classes in Java can have constructors with different parameters, known as constructor overloading.
In Java, a child class can have its own constructors in addition to inheriting constructors from the parent class.
Constructor overloading allows multiple constructors with different parameters in the same class.
Example: Parent class 'Vehicle' with a constructor taking 'int speed' parameter, and child class 'Car' with a constructor taking 'int speed' and 'String m...read more
Q24. Visual studio > file > new > project name
Creating a new project in Visual Studio involves navigating to File > New > Project and providing a name for the project.
Navigate to File menu in Visual Studio
Select New option
Choose Project option
Enter a name for the project
Q25. Remove repeating letters in a string using streams
Use streams to remove repeating letters in a string
Convert the string to a character array
Use a stream to filter out repeating characters
Collect the characters back into a string
Q26. type of marker interface
Marker interfaces are interfaces with no methods, used to mark classes for special treatment.
Marker interfaces have no methods, they simply mark a class as having a certain property or behavior.
Examples include Serializable interface in Java, which marks a class as serializable for object serialization.
Another example is Cloneable interface in Java, which marks a class as cloneable for object cloning.
Q27. time complexity of hashmap
Time complexity of hashmap operations is O(1) on average, but can be O(n) in worst case.
HashMap operations like get, put, remove have constant time complexity O(1) on average due to hashing
In worst case scenario, all keys hash to the same bucket resulting in linear search O(n)
Rehashing occurs when load factor exceeds a threshold, increasing time complexity temporarily
Q28. types of spring beans scopes
Spring beans can have different scopes like singleton, prototype, request, session, and application.
Singleton scope: Bean is created only once per Spring IoC container
Prototype scope: Bean is created each time it is requested
Request scope: Bean is created once per HTTP request
Session scope: Bean is created once per HTTP session
Application scope: Bean is created once per ServletContext
Q29. Sort the list of car model in reverse order
Sort the list of car models in reverse order
Use a sorting algorithm like bubble sort or quicksort to rearrange the array in reverse order
Alternatively, use built-in functions like sort() with a custom comparator function to achieve the same result
Q30. Find the palindrome in an array
Find palindromes in an array of strings
Iterate through each string in the array
Check if the string is equal to its reverse to determine if it's a palindrome
Store palindromes in a separate array
Q31. Current project architecture
Our current project architecture follows a microservices approach.
We use Docker containers to deploy each microservice.
We have a centralized API gateway to handle requests and routing.
We use Kubernetes for orchestration and scaling.
We use a combination of NoSQL and SQL databases depending on the service's needs.
Q32. Visual studio project creation steps
Visual Studio project creation involves several steps to set up a new project.
Open Visual Studio IDE
Click on 'File' > 'New' > 'Project'
Select the project type (e.g. Console Application, Web Application)
Choose the programming language (e.g. C#, VB.NET)
Specify project name, location, and solution name
Click 'Create' to generate the project files
Q33. differentiate joins in MySql?
MySql supports four types of joins: INNER, LEFT, RIGHT, and FULL OUTER.
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 rows from the left table.
FULL OUTER JOIN returns all the rows from both tables, with NULL values in the columns where there is no match.
JOIN and INNER JOIN are equivalent.
LEFT OUTER JOIN and LEF...read more
Q34. What are tools you used
I have used a variety of tools including IDEs, version control systems, testing frameworks, and build tools.
IDEs: Visual Studio, IntelliJ IDEA, Eclipse
Version Control Systems: Git, SVN
Testing Frameworks: JUnit, Selenium
Build Tools: Maven, Gradle
Q35. Find the reverse of a number
To reverse a number, convert it to a string, reverse the string, and convert it back to a number.
Convert the number to a string
Reverse the string
Convert the reversed string back to a number
Q36. What is callback?
A callback is a function that is passed as an argument to another function and is executed after a certain event occurs.
Callback functions are commonly used in event handling, asynchronous programming, and APIs.
They allow for more flexible and modular code by separating concerns.
Example: setTimeout function in JavaScript takes a callback function as an argument to be executed after a specified time.
Q37. Explained challenge faced
Developing a real-time chat application with WebSocket technology
Implemented WebSocket protocol for real-time communication
Faced challenges with handling large volumes of concurrent connections
Optimized code for efficient message delivery and latency reduction
Q38. Hashmap internal working of it
Hashmap is a data structure that stores key-value pairs and uses hashing to retrieve values quickly.
Hashmap uses an array to store the key-value pairs
The keys are hashed to generate an index in the array
If two keys hash to the same index, a collision occurs and the values are stored in a linked list
Retrieving a value involves hashing the key to find the index and then traversing the linked list if necessary
Q39. Define object and class
Object is an instance of a class that encapsulates data and behavior. Class is a blueprint for creating objects.
Object is a specific instance of a class
Class defines the properties and behaviors of objects
Example: Class 'Car' defines properties like color and behavior like drive()
Q40. features of java 8
Java 8 introduced several new features including lambda expressions, streams, and default methods.
Lambda expressions allow for functional programming and simplify code.
Streams provide a way to process collections of data in a functional way.
Default methods allow for adding new methods to interfaces without breaking existing code.
Date and time API improvements.
Nashorn JavaScript engine.
Parallel operations on collections.
Type annotations.
Repeatable annotations.
Optional class.
Ba...read more
Q41. flatten an array
Flatten an array of strings
Use recursion to iterate through the array and flatten nested arrays
Concatenate the elements of the array into a single array
Check if each element is an array, if so, recursively flatten it
Q42. Explain sap process
SAP process is a set of activities and tasks involved in implementing and managing SAP software solutions.
SAP process involves planning, designing, configuring, testing, and deploying SAP software.
It includes activities like requirement gathering, system analysis, customization, and integration.
SAP process also involves training end-users, data migration, and ongoing support and maintenance.
Examples of SAP processes include implementing SAP ERP, SAP CRM, or SAP HANA solutions...read more
More about working at CGI Group
Top HR Questions asked in Deel
Interview Process at Deel
Top Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month