Persistent SystemsWork with us
200+ Conduct Exam Technologies Interview Questions and Answers
Q1. Index of First Occurrence Problem Statement
Given two strings A
and B
, determine the index of the first occurrence of A
in B
. If A
is not present in B
, return -1.
Example:
Input:
A = "bc", B = "abcddbc"
Output:...read more
Find the index of the first occurrence of string A in string B.
Iterate through string B and check if a substring of length equal to A matches A.
Return the index of the first occurrence of A in B, or -1 if not found.
Q2. First Non-Repeating Character Problem Statement
You are given a string consisting of English alphabet characters. Your task is to identify and return the first character in the string that does not repeat. If e...read more
The task is to find the first non-repeating character in a string, or return the first character if all characters repeat.
Iterate through the string to count the frequency of each character.
Find the first character with a frequency of 1 and return it.
If no such character exists, return the first character of the string.
Q3. What are public and private IPs? How are they different?
Public and private IP addresses are used in computer networks. Public IPs are globally unique and accessible from the internet, while private IPs are used within a local network.
Public IP is assigned by the Internet Service Provider (ISP) and is used to identify a device on the internet.
Private IP is assigned by a local network administrator and is used to identify a device within a local network.
Public IPs are globally unique, allowing devices to communicate with each other ...read more
Q4. Write a program to reverse a string without using built-in string functions.
Program to reverse a string without using string function
Iterate through the string from end to start and append each character to a new string
Use a loop to swap the first and last characters, then move towards the middle until the entire string is reversed
Convert the string to a character array, then swap the first and last elements until the entire array is reversed
Q5. What are the fundamental differences between C and C++, especially concerning memory management?
C is a procedural programming language while C++ is an object-oriented programming language.
C is a procedural programming language, meaning it focuses on procedures or functions.
C++ is an extension of C and adds object-oriented features like classes and inheritance.
C++ supports polymorphism, encapsulation, and abstraction, which C lacks.
C++ allows the use of standard template library (STL) for data structures and algorithms.
C++ has exception handling mechanisms, whereas C doe...read more
Q6. What are keys in a database, and why are they used?
Keys in a database are unique identifiers used to establish relationships between tables and ensure data integrity.
Keys are used to uniquely identify records in a database table.
Primary keys are used to uniquely identify each record in a table.
Foreign keys establish relationships between tables.
Keys help enforce data integrity and maintain consistency in the database.
Examples of keys include primary keys, foreign keys, and unique keys.
Q7. Explain what deadlocks are and ways to prevent them.
Deadlocks are situations where two or more processes are unable to proceed because each is waiting for the other to release a resource.
Deadlocks occur when multiple processes are stuck in a circular waiting state.
Prevention techniques include resource allocation strategies, deadlock detection, and avoidance algorithms.
Examples of prevention techniques are using a resource allocation graph, implementing a banker's algorithm, and employing timeouts and resource preemption.
Q8. Explain how a message is transferred in the OSI layer.
A message is transferred in OSI layer through a process called encapsulation and decapsulation.
The message is divided into smaller chunks called packets at the transport layer.
Each packet is then encapsulated with headers containing necessary information.
The encapsulated packets are then passed down to the network layer.
At the network layer, the packets are further encapsulated with network layer headers.
The encapsulated packets are then passed down to the data link layer.
At ...read more
Q9. Explain how prediction works.
Prediction uses data analysis and statistical models to forecast future outcomes.
Prediction involves collecting and analyzing data to identify patterns and trends.
Statistical models are then used to make predictions based on the identified patterns.
Predictions can be made for a wide range of applications, such as weather forecasting, stock market trends, and customer behavior.
Accuracy of predictions can be improved by using machine learning algorithms and incorporating new da...read more
Q10. Draw a flowchart of classification algorithms.
Classification algorithms can be represented using flow charts.
Classification algorithms are used to categorize data into different classes.
Flow charts can be used to represent the decision-making process of classification algorithms.
Examples of classification algorithms include decision trees, k-nearest neighbors, and support vector machines.
Q11. You have three wheels and one scooter. Each wheel can travel 5km. What is the maximum distance that can be traveled?
The max distance that can be traveled is 15km.
Each wheel can travel 5km, so with 3 wheels, the total distance is 15km.
The scooter itself does not limit the distance that can be traveled, only the wheels do.
Q12. Do you know about My Passion Challenge test?
Yes, My Passion Challenge test is a coding competition for software engineers.
My Passion Challenge test is a coding competition that evaluates the coding skills of software engineers.
It is designed to test problem-solving abilities, algorithmic thinking, and coding proficiency.
Participants are given a set of coding challenges to solve within a specified time limit.
The challenges can range from simple to complex, covering various programming languages and concepts.
The test ass...read more
Q13. Why do we normalize our database?
Normalisation reduces data redundancy and improves data integrity in a database.
Prevents data duplication and inconsistencies
Simplifies database maintenance and updates
Improves query performance
Enforces data integrity and consistency
Follows best practices for database design
Examples: breaking down a customer table into separate tables for orders, addresses, and payments
Examples: creating a separate table for product categories instead of repeating the category name in each pr...read more
Q14. How would you sort a file within a specified range, given a hint?
Sorting a file within a range
Use a sorting algorithm like quicksort or mergesort
Read the file and store the data in an array or list
Sort the array or list within the given range
Write the sorted data back to the file
Q15. 1. what is Machine Learning
Machine learning is a subset of artificial intelligence that enables machines to learn from data without being explicitly programmed.
It involves training algorithms on large datasets to make predictions or decisions.
It can be supervised, unsupervised, or semi-supervised.
Examples include image recognition, natural language processing, and recommendation systems.
Q16. What are the default values of variables?
Default values of variables are the initial values assigned to variables if no value is explicitly provided.
Default value for integer variables is 0
Default value for floating point variables is 0.0
Default value for boolean variables is false
Default value for string variables is null
Default value for arrays is null
Q17. What are the key differences between Java and C++?
Java is platform independent while C++ is not.
Java code is compiled into bytecode which can run on any platform with a JVM, while C++ code needs to be compiled separately for each platform.
Java has automatic memory management through garbage collection, while C++ requires manual memory management.
Java has built-in support for multithreading, while C++ requires external libraries.
Java has a simpler syntax and is easier to learn than C++.
C++ allows for low-level memory manipula...read more
Q18. Write a function to find the second largest element from an integer array in a single traversal.
Find the second largest element from an integer array in a single traversal
Initialize two variables to store the largest and second largest elements
Traverse the array and update the variables accordingly
Return the second largest element
Q19. Which programming language was used in rocket launching software?
The language used in rocket launching software is typically Ada.
Ada is a high-level programming language designed for embedded systems and real-time applications.
Ada is known for its strong typing and safety features, making it suitable for critical systems like rocket launching software.
Q20. The Banker's Algorithm is a resource allocation and deadlock avoidance algorithm that tests for safety by simulating the allocation of predetermined maximum possible amounts of all resources, then makes an "s-s...
read moreBanker's algorithm is a resource allocation and deadlock avoidance algorithm used in operating systems.
It is used to prevent deadlocks by ensuring that the system never enters an unsafe state.
It works by simulating the allocation of resources and checking if the system will remain in a safe state.
It requires knowledge of the maximum resource needs of each process and the currently available resources.
If a request for resources would result in an unsafe state, the request is d...read more
Q21. Write a query to demonstrate an outer join on the given tables.
Demonstrate outer join using SQL query
Use LEFT OUTER JOIN or RIGHT OUTER JOIN to include all records from one table and matching records from another table
Use the ON keyword to specify the join condition
Use COALESCE function to handle NULL values in the result set
Q22. What are the features of C++?
C++ is a high-level programming language with features like object-oriented programming, templates, and memory management.
C++ supports object-oriented programming concepts like encapsulation, inheritance, and polymorphism.
Templates allow generic programming and code reusability.
C++ provides low-level memory manipulation through pointers.
Standard Template Library (STL) provides a collection of classes and functions for data structures and algorithms.
C++ supports operator overl...read more
Q23. What are the issues in cloud computing?
Issues in cloud include security, downtime, vendor lock-in, and data privacy.
Security concerns such as data breaches and unauthorized access
Downtime and service interruptions affecting business operations
Vendor lock-in and limited flexibility in choosing cloud providers
Data privacy and compliance with regulations such as GDPR and HIPAA
Q24. What data structure would you use to implement an elevator system?
The data structure implemented in an elevator is a queue.
Elevator requests are added to the queue in the order they are received.
The elevator serves requests in a first-come, first-served manner.
Once a request is completed, it is removed from the queue.
Example: If someone on the 5th floor requests the elevator, their request is added to the queue and the elevator will serve it after completing any previous requests.
Q25. Implement binary search on a linked list.
Implementing binary search on a linked list
Find the middle element of the linked list
Compare the middle element with the search key
If the middle element is greater than the search key, search in the left half of the linked list
If the middle element is less than the search key, search in the right half of the linked list
Repeat until the search key is found or the entire linked list is traversed
Q26. Explain the difference between encapsulation and abstraction.
Encapsulation is bundling data and methods together, while abstraction is hiding the implementation details.
Encapsulation combines data and methods into a single unit (class).
Abstraction hides the complex implementation details and only shows the necessary features.
Encapsulation provides data security by restricting access to certain data members.
Abstraction allows for easier maintenance and modification of code.
Example: Encapsulation - a class with private data members and p...read more
Q27. What recommendation systems have you worked on?
I have worked on building recommendation systems for e-commerce websites and streaming platforms.
Implemented collaborative filtering algorithms to recommend products based on user behavior
Utilized content-based filtering to suggest movies or TV shows based on user preferences
Developed hybrid recommendation systems combining collaborative and content-based filtering techniques
Q28. Flow diagram of final year project
The flow diagram of my final year project showcases the step-by-step process of its execution.
The flow diagram illustrates the sequence of activities and their dependencies.
It helps in understanding the overall structure and logic of the project.
Each step in the diagram represents a specific task or action.
Arrows indicate the flow of control or data between different steps.
Decision points are represented by diamond-shaped symbols.
Example: Start -> Input Data -> Process Data -...read more
Q29. Describe your experience with SQL queries for creating and manipulating tables and table elements.
Hands-on experience with SQL queries for creating and manipulating tables and table elements.
Use CREATE TABLE statement to create a new table
Use ALTER TABLE statement to add, modify, or delete columns in a table
Use INSERT INTO statement to add new rows of data into a table
Use UPDATE statement to modify existing data in a table
Use DELETE statement to remove rows from a table
Q30. What is a precompilation unit?
Precompilation unit is a compiled code that can be reused by multiple source files.
Precompilation unit is created by the compiler from the source code.
It contains the compiled code of header files and other dependencies.
It can be reused by multiple source files, reducing compilation time.
It is also known as precompiled header or PCH.
Example: stdafx.h in Visual Studio is a precompiled header file.
Q31. What is nodejs and difference between nodejs and javascript
Node.js is a server-side JavaScript runtime environment.
Node.js is built on top of the V8 JavaScript engine from Google Chrome.
It allows developers to write server-side code in JavaScript.
Node.js has a non-blocking I/O model, making it efficient for handling large amounts of data.
Node.js has a vast library of modules available through npm (Node Package Manager).
Q32. What is a closure? Explain in detail with an example.
Closure is a function that has access to variables in its outer scope, even after the outer function has returned.
Closure is created when a function is defined inside another function.
The inner function can access variables in the outer function, even after the outer function has returned.
Closure can be used to create private variables and functions in JavaScript.
Example: function outer() { var x = 10; function inner() { console.log(x); } return inner; } var closure = outer()...read more
Q33. Implement a conditional hierarchical model for a Java class.
Implementing a conditional hierarchical model for a Java class.
Create a Java class with multiple levels of hierarchy
Implement conditional statements to control the behavior of the class based on certain conditions
Use if-else or switch statements to define different actions for different conditions
Consider using interfaces or abstract classes for better abstraction and modularity
Q34. Explain one data structure that you know.
Binary Search Tree
A binary tree where each node has at most two children
Left child is less than parent, right child is greater
Allows for efficient searching, insertion, and deletion
Q35. What is the difference between let, var, and const?
let, var, and const are all used to declare variables in JavaScript, but they have different scoping rules and behaviors.
let and const were introduced in ES6, while var has been around since the beginning of JavaScript.
let and const are block-scoped, while var is function-scoped.
Variables declared with const cannot be reassigned, while let and var can be.
const variables must be initialized when they are declared, while let and var can be declared without initialization.
Exampl...read more
Q36. What is the difference between an Interface and an abstract class?
Interface is a contract that defines the methods a class must implement. Abstract class can have concrete methods and fields.
Interface cannot have method implementations, only method signatures.
A class can implement multiple interfaces but can only extend one abstract class.
Abstract class can have constructors, fields, and non-abstract methods.
Interfaces are used to achieve multiple inheritance in Java.
Example: Interface - Comparable, Abstract class - Animal with abstract met...read more
Q37. Write a program to print the first 50 prime numbers.
The first 50 prime numbers are...
Start with 2, the first prime number
Check each odd number greater than 2
Use trial division to check if a number is prime
Stop when you have found 50 prime numbers
Q38. Write two programs in any language of your choice.
Two programming code examples in any language
Example 1: Python - print('Hello, World!')
Example 2: Java - System.out.println('Hello, World!')
Q39. Write code to generate a half pyramid pattern using numbers.
Code for half pyramid using numbers
Use nested loops to print the numbers in each row
The number of columns in each row should be equal to the row number
Start the loop from 1 and go up to the desired number of rows
The program prints a star pattern using asterisks and spaces.
Use nested loops to iterate through rows and columns.
Determine the number of asterisks and spaces to print in each row.
Use conditional statements to decide when to print an asterisk or a space.
Q41. What are the scopes in JavaScript, and can you describe each one?
Scopes in JavaScript determine the accessibility of variables and functions.
Global scope: variables and functions declared outside any function are accessible globally
Local scope: variables and functions declared inside a function are only accessible within that function
Block scope: variables declared with let and const are only accessible within the block they are declared in
Function scope: variables declared with var are accessible within the function they are declared in
Q42. What is a virtual function?
A virtual function is a function in a base class that is overridden in a derived class, allowing polymorphic behavior.
Virtual functions are declared in a base class with the 'virtual' keyword.
They are meant to be 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: virtual void display() = 0; in a base class and void display() o...read more
Q43. What is virtualization in C++?
Virtualization in C++ is the process of creating a virtual version of a class or function to allow for polymorphism and dynamic binding.
Virtualization in C++ is achieved through the use of virtual functions and inheritance.
Virtual functions are declared in a base class and overridden in derived classes to provide different implementations.
Virtualization allows for polymorphism, where a pointer to a base class can point to objects of derived classes.
Dynamic binding is used to ...read more
Q44. What is the difference between HTTP and HTTPS?
HTTP is unsecured while HTTPS is secured with SSL/TLS encryption.
HTTP stands for Hypertext Transfer Protocol while HTTPS stands for Hypertext Transfer Protocol Secure.
HTTP operates on port 80 while HTTPS operates on port 443.
HTTP is vulnerable to attacks while HTTPS is secure due to SSL/TLS encryption.
HTTPS is indicated by a padlock icon in the browser's address bar.
HTTPS is used for secure online transactions such as online banking, e-commerce, etc.
Q45. Given a string, find the count of each character in the string.
The task is to count the occurrences of each character in a given string.
Iterate through the string and use a hashmap to store the count of each character
Convert the string to an array of characters for easier manipulation
Handle edge cases like empty string or null input
Consider using built-in functions like HashMap in Java or Counter in Python
Q46. Given a sentence, find the frequency of each word.
Use a hashmap to store word frequencies in a sentence.
Split the sentence into words using a space delimiter.
Create a hashmap to store word frequencies.
Iterate through the words and update the frequencies in the hashmap.
Return the hashmap with word frequencies.
Q47. If Python is an interpreted language, why are .pyc files generated?
Python compiles source code to bytecode for faster execution, stored in .pyc files.
Python interpreter compiles source code to bytecode before execution
Bytecode is platform-independent and faster to execute than source code
Compiled bytecode is stored in .pyc files for future use and faster startup time
If source code is modified, .pyc files are automatically recompiled
Q48. You have a 3-gallon jug and a 5-gallon jug. How would you measure out exactly 4 gallons of water?
Fill the 3 gallon jug, pour it into the 5 gallon jug, fill the 3 gallon jug again, pour it into the 5 gallon jug until it is full, leaving 1 gallon in the 3 gallon jug.
Fill the 3 gallon jug
Pour the 3 gallon jug into the 5 gallon jug
Fill the 3 gallon jug again
Pour the 3 gallon jug into the 5 gallon jug until it is full
The 4 gallon jug will have 1 gallon of water
Q49. What are arrays in Python?
An array in Python is a data structure that can hold multiple values of the same data type.
Arrays in Python are created using square brackets []
Elements in an array can be accessed using their index starting from 0
Example: names = ['Alice', 'Bob', 'Charlie']
Q50. What is the default connection pooling in Spring Boot, and how can it be customized?
The default connection pooling in Spring Boot is HikariCP, which can be customized through properties in the application.properties file.
HikariCP is the default connection pooling library in Spring Boot, known for its high performance and low overhead.
To customize the connection pooling, you can modify properties like 'spring.datasource.hikari.*' in the application.properties file.
For example, you can set maximum pool size, connection timeout, idle timeout, and other paramete...read more
Q51. Implement a regex matcher with support for '.' and '*'.
Regex matcher problem involves matching patterns in strings using regular expressions.
Understand the requirements of the regex pattern to be matched
Use tools like regex101.com to test and validate the regex pattern
Consider special characters and escape sequences in the regex pattern
Q52. Explain DML, DDL, and TCL.
DML, DDL, and TCL are types of SQL commands used to manipulate databases.
DML (Data Manipulation Language) is used to manipulate data in a database, such as inserting, updating, and deleting records.
DDL (Data Definition Language) is used to define the structure of a database, such as creating tables, indexes, and constraints.
TCL (Transaction Control Language) is used to manage transactions in a database, such as committing or rolling back changes.
Examples of DML commands inclu...read more
Q53. How do you define a 'many-to-many' relationship in Hibernate when there are no common columns between two tables?
Many-to-many relationship in Hibernate without common columns
Create a third table with foreign keys to both tables
Use @ManyToMany annotation in both entity classes
Specify the join table name and column names in @JoinTable annotation
Q54. What are the best practices for optimizing a Spring Boot application?
Best practices for optimizing a Spring Boot application
Use Spring Boot Actuator to monitor and manage application performance
Implement caching mechanisms like Spring Cache to reduce database calls
Optimize database queries and indexes for better performance
Use asynchronous processing with Spring's @Async annotation for non-blocking operations
Profile and analyze application performance using tools like VisualVM or JProfiler
Q55. How can you diagonally iterate through and print the elements of a 2D array?
Diagonally iterate through and print elements of a 2D array of strings.
Use nested loops to iterate through rows and columns of the 2D array.
Calculate the diagonal elements by incrementing row and column indices together.
Print the elements as you iterate through the diagonal of the array.
Q56. What is a heap dump, and how can it be used to identify memory leaks?
A heap dump is a snapshot of the memory usage of a Java application at a specific point in time.
Heap dumps can be generated using tools like jmap or VisualVM.
They provide detailed information about objects in memory, their sizes, and references.
Analyzing a heap dump can help identify memory leaks by pinpointing objects that are consuming excessive memory.
Common signs of memory leaks in a heap dump include a large number of objects of the same type or objects that should have ...read more
Q57. What is the difference between a tuple and a list?
Tuple is immutable and ordered while list is mutable and ordered.
Tuple is defined using () while list is defined using []
Tuple cannot be modified while list can be modified
Tuple is faster than list for accessing elements
Tuple is used for fixed data while list is used for dynamic data
Example: tuple = (1, 2, 3) and list = [1, 2, 3]
Q58. What is Passport.js and why is it used?
Passport.js is an authentication middleware for Node.js.
Passport.js provides a simple way to authenticate users with various authentication strategies such as local, OAuth, OpenID, etc.
It is highly customizable and can be integrated with any Node.js web application framework.
Passport.js maintains user sessions and provides a consistent API for authentication across different strategies.
Example: Using Passport.js with Express.js to authenticate users with Google OAuth2.
Example...read more
Q59. Internal Working of HashMap
HashMap is a data structure that stores key-value pairs and uses hashing to quickly retrieve values based on keys.
HashMap internally uses an array of linked lists to store key-value pairs.
When a key-value pair is added, the key is hashed to determine the index in the array where it will be stored.
If multiple keys hash to the same index, a linked list is used to handle collisions.
To retrieve a value, the key is hashed again to find the corresponding index and then the linked l...read more
Q60. What is the difference between repartition and coalesce?
Repartition increases or decreases the number of partitions in a DataFrame, while Coalesce only decreases the number of partitions.
Repartition can increase or decrease the number of partitions in a DataFrame, leading to a shuffle of data across the cluster.
Coalesce only decreases the number of partitions in a DataFrame without performing a full shuffle, making it more efficient than repartition.
Repartition is typically used when there is a need to increase the number of parti...read more
Q61. Given an array of integers, find the indices of two numbers that add up to a specific target value (e.g., 8 or a dynamic value).
Find indexes of two values in an array whose sum is 8 or a dynamic value
Iterate through the array and store the indexes of each element in a dictionary with the difference between the target sum and the element as the key
Check if the current element exists in the dictionary, if so, return the indexes of the two elements
Handle cases where the target sum is dynamic by replacing 8 with a variable
Q62. Write a media query to display three divs in a row for desktop view and in a column for mobile view.
Media query for 3 divs in row for desktop and column for mobile view
Use min-width and max-width to target desktop and mobile views respectively
Set display property to flex and flex-wrap to wrap for desktop view
Set display property to block for mobile view
Q63. What are event loops and their phases?
Event loop is a mechanism that allows JavaScript to perform non-blocking I/O operations.
Event loop is a loop that constantly checks the message queue and executes the next message if there is any.
Phases are the different stages of the event loop, such as timers, I/O callbacks, idle, and poll.
Event loop is crucial for Node.js to handle multiple requests simultaneously without blocking the main thread.
Example: setTimeout() function is added to the timer phase and executed after...read more
Q64. What are the pillars of OOP?
Pillars of OOP are Inheritance, Encapsulation, Abstraction, and Polymorphism.
Inheritance allows a class to inherit properties and behavior from another class.
Encapsulation restricts access to certain components of an object, protecting its integrity.
Abstraction hides complex implementation details and only shows the necessary features.
Polymorphism allows objects to be treated as instances of their parent class or their own class.
Q65. What are joins in SQL?
Joins in SQL are used to combine rows from two or more tables based on a related column between them.
Joins are used to retrieve data from multiple tables based on a related column
Common types of joins include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN
INNER JOIN returns rows when there is at least one match in both tables
LEFT JOIN returns all rows from the left table and the matched rows from the right table
RIGHT JOIN returns all rows from the right table and the matched...read more
Q66. How do you find the second largest integer in an array without using collections or sorting?
Find second largest integer in an array without sorting or using collections.
Iterate through array and keep track of largest and second largest integers.
Compare each element with current largest and second largest integers.
Return second largest integer.
Q67. Explain the syntax of the RequestMapping annotation and how and where it is used.
Explaining request mapping annotation syntax and usage in Java development
RequestMapping annotation is used to map HTTP requests to specific methods in a controller class
It can be used to specify the URL path, HTTP method, request parameters, headers, and more
Example: @RequestMapping(value = '/users', method = RequestMethod.GET)
This maps a GET request to the '/users' URL path
Q68. Write a program that prints a star pattern.
A star program prints a pattern of stars in a specific shape.
Use nested loops to control the number of rows and columns
Use if-else statements to determine when to print a star or a space
Example: Print a pyramid of stars with 5 rows
Q69. How do you decide on the number of cores and worker nodes?
Cores and worker nodes are decided based on the workload requirements and scalability needs of the data processing system.
Consider the size and complexity of the data being processed
Evaluate the processing speed and memory requirements of the tasks
Take into account the parallelism and concurrency needed for efficient data processing
Monitor the system performance and adjust cores and worker nodes as needed
Q70. Find the top 5 countries with the highest population using Spark and SQL.
Use Spark and SQL to find the top 5 countries with the highest population.
Use Spark to load the data and perform data processing.
Use SQL queries to group by country and sum the population.
Order the results in descending order and limit to top 5.
Example: SELECT country, SUM(population) AS total_population FROM table_name GROUP BY country ORDER BY total_population DESC LIMIT 5
Q71. How does the PUT method behave when there is no data to update?
PUT method updates data if available, else returns success with no changes.
PUT method updates the resource if it exists, else creates a new resource
If no data is provided, the server returns a success response with no changes made
Example: PUT /users/1 with empty body will return success with no changes if user with id 1 exists
Q72. How do you make a call from one namespace to another in an AKS environment?
To make a call from one namespace to another in AKS environment, use the fully qualified domain name (FQDN) of the service.
Use the FQDN of the service to make a call from one namespace to another in AKS environment
The FQDN should include the namespace and service name, for example: myservice.mynamespace.svc.cluster.local
Ensure that the service is exposed within the cluster and has a stable IP address
Use the appropriate network policies to allow traffic between namespaces if n...read more
Q73. What is Oopps? Concept of polmorphism.
OOPs stands for Object-Oriented Programming. Polymorphism is the ability of an object to take on many forms.
OOPs is a programming paradigm that focuses on objects and their interactions.
Polymorphism allows objects of different classes to be treated as if they are of the same class.
There are two types of polymorphism: compile-time and runtime.
Compile-time polymorphism is achieved through method overloading.
Runtime polymorphism is achieved through method overriding.
Example of p...read more
Q74. Multithreading. Ways of synchronisation. How to handle exceptions.
Multithreading synchronization and exception handling in Java.
Synchronization can be achieved using synchronized keyword, locks, and semaphores.
Exceptions can be handled using try-catch blocks, finally block, and throwing exceptions.
Deadlock can be avoided by acquiring locks in a consistent order.
Thread safety can be ensured by using immutable objects and thread-safe collections.
Examples of thread-safe collections are ConcurrentHashMap and CopyOnWriteArrayList.
Q75. Given a nested JavaScript object, how would you print only the values, excluding the keys?
Print only values from a nested JS object
Use Object.values() to get an array of values
Recursively iterate through nested objects
Filter out non-object values before iterating
Q76. Tell me in detail how you implement the extent report.
Extent report can be implemented by adding the extent report dependency, creating an instance of ExtentReports class, and using ExtentTest class to create test logs.
Add the extent report dependency in the project's pom.xml file
Create an instance of ExtentReports class in the @BeforeSuite method
Create an instance of ExtentTest class in the @BeforeMethod method
Use ExtentTest class to log test steps and results
Generate the report using the flush() method in the @AfterSuite metho...read more
Q77. How do you ensure that some default code executes when the Spring Boot application starts up?
Use @PostConstruct annotation or implement CommandLineRunner interface
Use @PostConstruct annotation on a method that needs to be executed on startup
Implement CommandLineRunner interface and override run() method
Add the code that needs to be executed on startup in the method annotated with @PostConstruct or in the run() method
Example: @PostConstruct public void init() { //code to be executed on startup }
Example: public class MyApp implements CommandLineRunner { public void run...read more
Q78. How would you convince a client who disagrees with your design?
I would present the client with a detailed explanation of the design, highlighting its benefits and addressing any concerns they may have.
Listen to the client's concerns and understand their perspective
Explain the design concept clearly and address how it meets the client's needs
Provide visual aids such as sketches or 3D models to help the client visualize the design
Offer alternative solutions or compromises that may address the client's concerns while still maintaining the i...read more
Q79. Why is NodeJS single-threaded?
Node.js is single-threaded to optimize performance and simplify programming.
Node.js uses an event-driven, non-blocking I/O model.
This allows for efficient handling of multiple requests without creating new threads.
Node.js also uses a single event loop to manage all I/O operations.
This simplifies programming by eliminating the need for complex thread synchronization.
However, Node.js can still take advantage of multi-core systems by creating child processes.
Q80. Write a SQL query to select the second highest value from a column in a table.
SQL query to select 2nd highest from a column of a table
Use ORDER BY to sort the column in descending order
Use LIMIT to select the second row
Use subquery to avoid duplicates
Q81. Write code to manipulate a list of numbers to return only prime numbers using list comprehension and lambda functions.
Using list comprehension and lambda function to manipulate a list of prime numbers
Use list comprehension to generate a list of numbers
Use a lambda function to check if a number is prime
Filter the list of numbers using the lambda function to get prime numbers
Q82. What is the difference between Node.js and Express.js?
Node is a runtime environment for executing JavaScript code, while Express is a web application framework built on top of Node.
Node provides the platform for running JavaScript code outside of a web browser
Express is a lightweight framework that simplifies building web applications on top of Node
Express provides features like routing, middleware, and templating that make it easier to build web applications
Node and Express are often used together to build scalable and efficien...read more
Q83. What is multi threading and difference between threads and processes
Multithreading is the concurrent execution of multiple threads to achieve parallelism and improve performance.
Multithreading allows multiple threads to run concurrently within a single process.
Threads share the same memory space and resources of the process they belong to.
Processes are independent instances of a program, each with its own memory space and resources.
Processes do not share memory directly and communicate through inter-process communication (IPC).
Threads are lig...read more
Q84. How many Python modules have you used?
I have used multiple python modules for various purposes.
I have used NumPy for numerical computations.
I have used Pandas for data analysis and manipulation.
I have used Matplotlib for data visualization.
I have used Flask for web development.
I have used Requests for making HTTP requests.
I have used BeautifulSoup for web scraping.
I have used Scikit-learn for machine learning tasks.
I have used TensorFlow for deep learning tasks.
Q85. Write a SQL query to find the names of people who have the same name.
Q86. What happens when we enforce schema?
Enforcing schema ensures that data conforms to a predefined structure and rules.
Ensures data integrity by validating incoming data against predefined schema
Helps in maintaining consistency and accuracy of data
Prevents data corruption and errors in data processing
Can lead to rejection of data that does not adhere to the schema
Q87. How can distributed tracing be effectively handled in microservices?
Distributed tracing in microservices helps track requests across services for better performance and debugging.
Use a tracing library like OpenTelemetry or Zipkin to instrument your services.
Implement context propagation to pass trace IDs through service calls, e.g., using HTTP headers.
Aggregate and visualize trace data using tools like Jaeger or Grafana for insights.
Monitor latency and bottlenecks by analyzing trace data to optimize service performance.
Ensure consistent trace...read more
Q88. How would you suggest an engagement model to address a customer problem?
Engage with the customer to understand their problem and suggest a suitable engagement model.
Listen actively to the customer's problem and ask relevant questions to gain a deeper understanding.
Identify the customer's goals and priorities to suggest an engagement model that aligns with their needs.
Consider factors such as budget, timeline, and resources when proposing an engagement model.
Provide clear and concise explanations of the proposed engagement model and its benefits t...read more
Q89. What do the HTTP error codes 400 and 500 represent?
HTTP error codes 400 and 500 represent client and server errors respectively.
HTTP error code 400 indicates a client-side error, such as a bad request or invalid input.
HTTP error code 500 indicates a server-side error, such as an internal server error or database connection issue.
Other common client-side errors include 401 (unauthorized), 403 (forbidden), and 404 (not found).
Other common server-side errors include 503 (service unavailable) and 504 (gateway timeout).
Q90. What is inheritance and what are its types?
Inheritance is a concept in object-oriented programming where a class inherits properties and behaviors from another class.
Inheritance allows for code reuse and promotes modularity.
There are different types of inheritance: single, multiple, multilevel, and hierarchical.
Example: A 'Car' class can inherit properties and behaviors from a 'Vehicle' class.
Q91. How does DAG handle fault tolerance?
DAGs handle fault tolerance by rerunning failed tasks and maintaining task dependencies.
DAGs rerun failed tasks automatically to ensure completion.
DAGs maintain task dependencies to ensure proper sequencing.
DAGs can be configured to retry failed tasks a certain number of times before marking them as failed.
Q92. Why is Next.js preferred over React.js?
Next.js is preferred over React.js for server-side rendering, automatic code splitting, and simplified routing.
Next.js provides built-in support for server-side rendering, improving performance and SEO.
Automatic code splitting in Next.js allows for faster page loads by only loading necessary code.
Next.js simplifies routing with file-based routing, making it easier to organize and navigate between pages.
Next.js also offers features like static site generation and API routes fo...read more
Q93. Write a REST API to get employee details by employee ID.
A Rest api to get employee details by employee id
Create a GET endpoint with a path like '/employees/{employeeId}'
Retrieve employee details from a database using the employee id
Return the employee details in JSON format
Q94. What is Python testing, and what are its unit tests?
Python testing is a process of verifying the functionality of code. Unittest is a built-in testing framework in Python.
Python testing is done to ensure that the code is working as expected.
Unittest is a testing framework that comes with Python's standard library.
It provides a set of tools for constructing and running tests.
Tests are written as methods within a class that inherits from unittest.TestCase.
Assertions are used to check if the expected output matches the actual out...read more
Q95. How does the Agile process work?
Agile process involves iterative development, collaboration, and flexibility in responding to change.
Agile process breaks down projects into smaller, manageable tasks called sprints.
Teams work in short iterations, typically 2-4 weeks, to deliver working software.
Regular meetings like daily stand-ups, sprint planning, and retrospectives help keep the team on track.
Customer feedback is incorporated throughout the development process to ensure the final product meets their needs...read more
Q96. How does a ConcurrentHashMap work internally?
Concurrent Hash Map is a thread-safe implementation of Hash Map.
Uses multiple segments to allow concurrent access
Each segment is a separate hash table with its own lock
Segments are dynamically added or removed based on usage
Uses CAS (Compare and Swap) operation for updates
Provides higher concurrency than synchronized Hash Map
Q97. What happens if there is no server in Spring Boot?
Spring Boot is designed to be a standalone application, so it can run without a separate server.
Spring Boot includes an embedded server (like Tomcat or Jetty) so it can run independently.
The embedded server is included in the application's JAR file, making it self-contained.
This allows Spring Boot applications to be easily deployed and run without the need for a separate server installation.
Q98. What are the differences between Spring WebFlux and Spring MVC?
Q99. What is the relationship between an account and a contact?
Account and contact have a parent-child relationship in Salesforce.
An account represents a company or organization, while a contact represents an individual associated with that account.
An account can have multiple contacts, but a contact can only be associated with one account.
Contacts are linked to accounts through a lookup relationship.
Account and contact records can be related using the AccountId field on the contact object.
Q100. What is the concept of tombstone lifetime and how do lingering objects relate to it?
Tombstone lifetime defines how long deleted objects remain in Active Directory before permanent removal, impacting lingering objects.
Tombstone lifetime is the duration an object remains marked as deleted in Active Directory before being purged.
By default, the tombstone lifetime is set to 180 days in Windows Server environments.
Lingering objects occur when a domain controller does not receive updates about deleted objects within the tombstone lifetime.
For example, if a user ac...read more
Top HR Questions asked in Conduct Exam Technologies
Interview Process at Conduct Exam Technologies
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month