BNY
20+ TCS Interview Questions and Answers
You have been given a string STR. Your task is to find the total number of palindromic substrings of STR.
Example :
If the input string is "abbc", then all the possible palindromic substri...read more
The gardener wants to water the garden by opening the minimum number of taps. The garden is one-dimensional along the x-axis of length N i.e. the garden starts from point 0...read more
You have given a Singly Linked List of integers, determine if it forms a cycle or not.
A cycle occurs when a node's next points back to a previous node in the list. The li...read more
Write a SQL query: Employee and department table is given you need to find the salary of employees in each department
Which databases have you used?
Difference between SQL and NoSQL?
What is the CAP theorem?
What is a BST, what are other types of trees?
Theoretical questions based on the Graph data structure.
Where graph traversals algorithms are used? Tell about different traversal algorithms and wri...read more
- Switch vs Hub
- Which data structure is used in switches?
- TCP vs UDP
Q7. KMP Search Algorithm
KMP Search Algorithm is a string searching algorithm that finds occurrences of a word within a main text.
KMP algorithm is based on the idea of pre-processing the pattern to avoid unnecessary comparisons.
It uses a prefix function to determine the longest proper prefix of the pattern that is also a suffix.
This allows the algorithm to skip characters in the text that cannot be part of the pattern, improving efficiency.
You are given an infinite supply of coins of each of denominations D = {D0, D1, D2, D3, ...... Dn-1}. You need to figure out the total number of ways W, in which you can make a change fo...read more
You have been given a number of stairs. Initially, you are at the 0th stair, and you need to reach the Nth stair. Each time you can either climb one step or two steps. You are...read more
You are given an array 'ARR' of 'N' positive integers. You need to find the minimum number of operations needed to make all elements of the array equal. You can perform addition, multiplicatio...read more
Given a sequence of numbers ‘ARR’. Your task is to return a sorted sequence of ‘ARR’ in non-descending order with help of the merge sort algorithm.
Example :
Merge Sort Algorithm - Merge sort is a Div...read more
You are given a pattern in the form of a string and a collection of words. Your task is to determine if the pattern string and the collection of words have the same order.
Note :
The strings are...read more
You are given two sorted linked lists. You have to merge them to produce a combined sorted linked list. You need to return the head of the final linked list.
Note:
The given linked ...read more
Q14. Tell me about shares and bonds
Shares and bonds are types of investments. Shares represent ownership in a company, while bonds are debt securities issued by governments or corporations.
Shares represent ownership in a company, giving the shareholder voting rights and potential dividends.
Bonds are debt securities issued by governments or corporations, where the issuer promises to repay the bondholder the principal amount plus interest at a specified date.
Shares are considered riskier but offer higher potenti...read more
Asked usages of different queries. How to do same operation using two queries, nested queries and joins etc
Asked me to explain my projects briefly and also asked lot of cross question
what is polymorphism, abstract methods and classes
Q17. what is adressing mode and its types
Addressing mode is a technique used in computer architecture to specify how to calculate the effective address of an operand.
Addressing mode determines how the CPU accesses data from memory
Types of addressing modes include direct, indirect, indexed, and register
Examples: direct addressing mode - MOV A, 1000H, indirect addressing mode - MOV A, [BX], indexed addressing mode - MOV A, [BX+SI], register addressing mode - MOV A, BX
Q18. What is corporate action and its type ?
Corporate action refers to events initiated by a public company that impact its shareholders and securities.
Types of corporate actions include dividends, stock splits, mergers and acquisitions, rights issues, and bonus issues.
Dividends are payments made to shareholders from a company's profits.
Stock splits involve dividing existing shares into multiple shares to lower the share price.
Mergers and acquisitions are when two companies combine or one company takes over another.
Rig...read more
asked low level design of e-commerce website
Q20. what is tcp osi difference
TCP is a transport layer protocol while OSI is a reference model for network communication.
TCP is a protocol responsible for establishing and maintaining a connection between two devices.
OSI is a conceptual framework that standardizes the functions of a telecommunication or computing system into seven abstraction layers.
TCP operates at the transport layer (Layer 4) of the OSI model.
OSI model includes layers like physical, data link, network, transport, session, presentation, ...read more
Q21. What is the most difficult accounting situation you handled
The most difficult accounting situation I handled was resolving a complex financial discrepancy in a multinational company.
Identifying and reconciling discrepancies in financial records
Coordinating with multiple departments and stakeholders
Analyzing large volumes of data to identify the root cause
Implementing corrective measures to prevent future discrepancies
Ensuring compliance with accounting standards and regulations
Q22. What is derivative?
A derivative is a financial contract whose value is derived from the performance of an underlying asset, index, or interest rate.
Derivatives can be used for hedging, speculation, or arbitrage.
Common types of derivatives include options, futures, forwards, and swaps.
For example, a stock option gives the holder the right to buy or sell a stock at a specified price within a certain time frame.
Q23. reverse linkedlist in 3 steps
Iterate through the linked list and reverse the pointers in 3 steps
Iterate through the linked list and keep track of the previous, current, and next nodes
Update the pointers to reverse the direction of the nodes
Repeat the process until the end of the linked list is reached
Q24. Write a SQL code to union two tables with ID not present in another table
Q25. What do you mean by cascade
Cascade refers to the automatic propagation of changes made to a parent record to its related child records.
Cascade is a feature in database management systems that ensures data consistency and integrity.
It allows changes made to a parent record to be automatically reflected in its related child records.
For example, if a parent record is deleted, all its child records will also be deleted automatically.
Cascade can be set up for various types of actions, such as update, delete...read more
Q26. What do mean by derivatives
Derivatives are financial instruments whose value is derived from an underlying asset or group of assets.
Derivatives can be used for hedging risk, speculating on price movements, or gaining exposure to assets without owning them.
Common types of derivatives include options, futures, forwards, and swaps.
Derivatives can be traded on exchanges or over-the-counter (OTC).
They are often used by investors, companies, and financial institutions to manage risk or enhance returns.
Q27. Difference between delete and truncate
Delete removes specific rows while truncate removes all rows from a table.
Delete is a DML command while truncate is a DDL command.
Delete can be rolled back while truncate cannot be rolled back.
Delete is slower than truncate as it logs each row deletion while truncate does not.
Delete can have a WHERE clause to specify which rows to delete while truncate deletes all rows.
Delete does not reset the identity of the table while truncate resets the identity of the table.
Example: DEL...read more
Q28. SQL to union two Tables
Top HR Questions asked in TCS
Interview Process at TCS
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month