Barclays
10+ Titagarh Rail Systems Interview Questions and Answers
Q1. Shopping Spree Problem Statement
Preeti plans to shop for her father's birthday at a store with unlimited quantities of N different items. She has a budget that allows her to buy a maximum of K items. Help Pree...read more
Calculate the number of ways Preeti can purchase items within budget, with at least one item quantity differing.
Use dynamic programming to calculate the number of ways to purchase items within budget.
Consider different scenarios where Preeti buys different quantities of each item.
Return the result modulo 10^9 + 7 to handle large answers.
Q2. Words Magic with Prefix Replacement Problem
Ninja is provided with a dictionary of words, WORDS
, and a sentence, SENTENCE
, which consists of words separated by spaces. The goal is to minimize the size of the SE...read more
The goal is to minimize the size of a sentence by replacing words with prefixes from a given dictionary.
Iterate through each word in the sentence and check if a prefix exists in the dictionary
Replace the word with the smallest prefix found in the dictionary
Repeat the process for all words in the sentence
Q3. A shot fired from a gun pointing towards a tree full of birds. All birds left except one. Why ?
The one bird was already dead.
The bird was already dead before the shot was fired.
The bird was injured and unable to fly away with the rest of the birds.
The bird was a decoy bird used for hunting purposes.
The bird was a trained bird used for falconry.
Q4. Cut cake into 8 pieces .You can use knife 3 times only
Cut cake into 8 pieces using knife 3 times only.
First, cut the cake horizontally into two equal halves.
Then, cut the cake vertically into four equal pieces.
Finally, cut the cake horizontally again into eight equal pieces.
Make sure to use the knife efficiently to minimize the number of cuts.
Practice visualization before making the cuts to avoid mistakes.
Q5. Explain the background process that takes place during an atm transaction
ATM transaction involves multiple background processes including authentication, authorization, and communication with bank servers.
Customer inserts card and enters PIN
ATM authenticates the card and PIN
ATM requests authorization from bank server
Bank server verifies account balance and approves or denies transaction
ATM dispenses cash or completes other requested transaction
ATM updates account balance and sends transaction details to bank server
Q6. Give two tables perform different type of joins
Two tables performing different types of joins
Inner join: Returns rows when there is a 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 rows from the left table
Full outer join: Returns all rows when there is a match in either table
Q7. Can you catchup with new stack
Yes, I can catch up with new stack.
I have a strong foundation in software development and can quickly learn new technologies.
I have experience in adapting to new programming languages and frameworks.
I am proactive in keeping up with industry trends and continuously learning new skills.
I have successfully transitioned to new stacks in previous projects.
I can provide examples of projects where I quickly learned and utilized new technologies.
Q8. what is data encapsulation?
Data encapsulation is the concept of bundling data and methods that operate on the data into a single unit, known as a class.
Encapsulation hides the internal state of an object and only exposes the necessary functionalities through methods.
It helps in achieving data abstraction and information hiding.
Example: A class 'Car' encapsulates data like speed, color, and methods like accelerate() and brake().
Q9. multiple inheritance allowed in java?
No, multiple inheritance is not allowed in Java.
Java does not support multiple inheritance for classes to avoid the diamond problem.
However, multiple inheritance is allowed for interfaces in Java.
Example: class A extends B, C is not allowed, but interface X extends Y, Z is allowed.
Q10. diff btw static and final
Static is used to define class-level variables and methods, while final is used to define constants and prevent inheritance or modification.
Static variables and methods belong to the class itself, while final variables cannot be changed once initialized.
Static members can be accessed without creating an instance of the class, while final members must be accessed through an instance.
Static variables are shared among all instances of a class, while final variables are unique to...read more
Q11. expalin the project
Developed a web-based project management tool for tracking tasks and deadlines.
Used HTML, CSS, and JavaScript for front-end development
Implemented backend functionality using Node.js and MongoDB
Incorporated user authentication and authorization features
Utilized RESTful APIs for communication between front-end and back-end
Top HR Questions asked in Titagarh Rail Systems
Interview Process at Titagarh Rail Systems
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month