Nagarro
20+ Madhav Stelco Interview Questions and Answers
Q1. Write a program: two input, one is N(any integer, lets say 3), second input will be array of integers(duplicate/multiple occurrences of same integer, lets say [2,3,2,4,2] ). You have to return the number whose...
read moreProgram to find the number whose occurrence is greater than N/2 in an array of integers.
Take two inputs, one integer N and an array of integers.
Loop through the array and count the occurrence of each number.
Return the number whose occurrence is greater than N/2.
If no such number found, return '-1'.
Q2. This is for Mainframe Dev. how would you sort two unsorted ps files into three different ps files having unique records of both the files in different files and common records in one. explain the steps.
Sort two unsorted PS files into three different PS files with unique and common records.
Use SORT utility to sort the two input files individually.
Use JOINKEYS to join the two sorted files on a common key.
Use OUTFIL to direct the output to three different files based on the record type.
Ensure that the output files have unique records and common records as required.
Q3. Write a program: single input as a string(lets say "aaabcccfffghh"), you have to return the char and their occurrence as a string. In this case you have to return "a3b1c3f3g1h2"
Program to return character and their occurrence in a string.
Iterate through the string and count the occurrence of each character.
Store the count in a dictionary or hashmap.
Create a new string by concatenating the character and their count.
Return the new string.
Q4. how would you handle overflow condition of an array? SB37,SD37,SE37,S0C4,S0C7?JCL - how to backup all GDG versions in one step? what are COMP & COMP-3 vars and what it's used for?
Handling overflow condition of an array and backing up GDG versions in one step in JCL
For overflow, check array bounds before accessing elements
For SB37, increase primary/secondary space allocation
For SD37, increase directory blocks
For SE37, increase primary/secondary space allocation for PDS
For S0C4, check for null pointers or uninitialized variables
For S0C7, check for invalid data types or out-of-bounds array access
To backup all GDG versions in one step, use the GDG base na...read more
Q5. Difference between microflow flow and nano flow
Microflow is a flow with a rate of 1-1000 µL/min while nano flow is a flow with a rate of 1-1000 nL/min.
Microflow is used in HPLC and capillary electrophoresis while nano flow is used in nano-LC and proteomics.
Microflow requires larger sample volumes while nano flow requires smaller sample volumes.
Microflow has lower sensitivity compared to nano flow.
Q6. write a program: if input is "my_first_variable" return output as "myFirstVariable" and vice-versa
A program to convert a variable name from snake_case to camelCase and vice-versa.
Split the input string by underscore (_) to get an array of words.
For snake_case to camelCase conversion, capitalize the first letter of each word except the first one.
For camelCase to snake_case conversion, insert an underscore (_) before each capital letter except the first one.
Join the array of words with the appropriate delimiter to get the converted variable name.
Q7. How would you search any string(numeric or alphanumeric) from a ps file(position could b any)?
To search a string from a ps file, use the grep command with the string and file name as arguments.
Open the ps file in a text editor or use the command line to navigate to the file location.
Use the grep command followed by the string you want to search and the file name as arguments.
If the string is found, the command will return the line(s) containing the string.
If the string is not found, the command will return nothing.
You can also use regular expressions with the grep com...read more
Q8. How you are going to implement in Mendix
I will implement in Mendix by following best practices and utilizing its features to build scalable and efficient solutions.
Identify the requirements and design the solution using Mendix Studio or Studio Pro
Leverage Mendix's built-in modules and widgets to reduce development time
Use microflows and nanoflows to implement business logic
Integrate with external systems using Mendix's connectors and APIs
Perform testing and debugging using Mendix's built-in tools
Deploy the solution...read more
Q9. Types of entity in Mendix
Mendix has three types of entities: persistent, non-persistent, and microflow.
Persistent entities are stored in the database and have a unique identifier.
Non-persistent entities are not stored in the database and are used for temporary data.
Microflow entities are used to define the input and output parameters of a microflow.
Entities can have attributes, associations, and validations.
Examples of entities include Customer, Order, and Product.
Q10. what will b d equiv. of varchar(20) in a cobol pgm? SQL 805, 922?
Equivalent of varchar(20) in COBOL and SQL error codes 805 and 922
In COBOL, the equivalent of varchar(20) is PIC X(20)
SQL error code 805 indicates program not found or not authorized
SQL error code 922 indicates memory allocation failure
Q11. Join duplicate records in tables and output of inner join, left outer join, right outer join, full join. Table1 : 1, 1, 2, 2, 2, Null Table2: 1, 1, 2, 3, Null, Null
Demonstrate joining duplicate records in tables using different types of joins.
Inner join will only return the matching records (1,1 and 2,2) from both tables.
Left outer join will return all records from Table1 and matching records from Table2 (including Null values).
Right outer join will return all records from Table2 and matching records from Table1 (including Null values).
Full join will return all records from both tables (including Null values) and matching records.
To joi...read more
Q12. Specify few things which are not mentioned in Nagarro
Some things not mentioned in Nagarro
Specific technologies or tools used in current projects
Recent achievements or awards
Upcoming projects or initiatives
Personal hobbies or interests related to engineering
Future career goals or aspirations
Q13. COBOL DB2 compilation process? Diff bw CS and RR? Explain Restart logic in a cobol pgm.
COBOL DB2 compilation process, CS vs RR, and Restart logic in COBOL program.
COBOL DB2 compilation process involves precompilation, compilation, and linkage editing.
CS (Change Strategy) and RR (Release Strategy) are two different methods of implementing DB2 changes.
Restart logic in COBOL program is used to resume program execution from a specific point after an interruption.
Restart logic can be implemented using checkpoints, savepoints, and restartable sections.
CS involves mak...read more
Q14. Calling Rest API steps
To call a REST API, first identify the endpoint and required parameters. Then use a HTTP client library to send a request.
Identify the endpoint and required parameters
Choose a HTTP client library (e.g. Axios, Fetch)
Send a request with the appropriate HTTP method (e.g. GET, POST)
Handle the response and any errors
Example: axios.get('https://api.example.com/data', {params: {id: 123}})
Example: fetch('https://api.example.com/data?id=123', {method: 'POST'})
Q15. Project architecture in terms of technical & your contribution
I have contributed to project architecture by designing and implementing technical solutions.
I have designed the overall system architecture based on project requirements.
I have implemented various technical solutions such as database design, API development, and integration with third-party services.
I have collaborated with cross-functional teams to ensure seamless integration of different components.
I have also conducted code reviews and provided technical guidance to junio...read more
Q16. Definition of Types of entity
Types of entity refer to the different categories of objects or concepts that can be represented in a system or model.
Entities can be physical objects, such as people or buildings, or abstract concepts, such as ideas or relationships.
Entities can be further classified as unique or non-unique, depending on whether there can be multiple instances of the same entity.
Examples of entities include customers, products, orders, invoices, and employees.
Q17. What is SCD and it's types ?
SCD stands for Slowly Changing Dimensions. It is a technique used in data warehousing to track changes in data over time.
SCD is used to maintain historical data in a data warehouse
There are three types of SCD: Type 1, Type 2, and Type 3
Type 1 SCD overwrites old data with new data
Type 2 SCD creates a new record for each change and maintains a history of changes
Type 3 SCD adds new columns to the existing record to track changes
Example: In a customer database, SCD can be used to...read more
Q18. Writing program using any programming language
I would write a program in Python to automate a repetitive task.
Identify the task and break it down into smaller steps
Choose the appropriate data structures and algorithms
Write clean and readable code with proper documentation
Test the program thoroughly before deployment
Q19. how microservices communicate
Microservices communicate through APIs and messaging protocols.
APIs allow microservices to expose their functionality to other services or applications.
Messaging protocols enable asynchronous communication between microservices.
Common messaging protocols include Kafka, RabbitMQ, and ActiveMQ.
Microservices can also use service meshes like Istio to manage communication and traffic between services.
Communication can be synchronous or asynchronous depending on the use case.
Q20. internal working of hashmap
HashMap is a data structure that stores key-value pairs and uses hashing to retrieve values quickly.
Hashing function is used to convert the key into an index of an array where the value is stored
Collisions occur when two keys have the same hash value, which is resolved using separate chaining or open addressing
HashMap allows null values and one null key
The load factor determines when the HashMap should resize to maintain performance
The internal implementation of HashMap uses ...read more
Q21. Test cases of Calculator
Test cases for a calculator application
Test addition functionality with positive numbers (e.g. 2 + 3 = 5)
Test subtraction functionality with negative numbers (e.g. 5 - 8 = -3)
Test multiplication functionality with zero (e.g. 4 * 0 = 0)
Test division functionality with decimal numbers (e.g. 10 / 3 = 3.33)
Q22. Multithreading in java
Multithreading in Java allows multiple threads to execute concurrently, improving performance and responsiveness.
Multithreading is achieved in Java by extending the Thread class or implementing the Runnable interface.
Threads share the same memory space, allowing them to communicate and synchronize using methods like wait(), notify(), and notifyAll().
Java provides high-level concurrency utilities like Executors and Thread Pools to manage multiple threads efficiently.
Care must ...read more
More about working at Nagarro
Interview Process at Madhav Stelco
Top Senior Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month