TCS iON
30+ RAICAM Interview Questions and Answers
Q1. Minimum Sum in Matrix Problem Statement
You are given a 2D matrix 'ARR' of size 'N x 3' with integers, where 'N' is the number of rows. Your task is to compute the smallest sum achievable by selecting one eleme...read more
Find the smallest sum achievable by selecting one element from each row of a 2D matrix, following certain constraints.
Iterate through each row and calculate the minimum sum by selecting elements that do not violate the constraints.
Keep track of the minimum sum achieved so far.
Avoid selecting elements directly beneath previously selected elements.
Example: For input [[1, 2, 3], [4, 8, 6], [1, 5, 3]], the optimal selection would be 1 + 6 + 1 = 8.
Q2. Find the Longest Palindromic Substring
Given a string ‘S’ composed of lowercase English letters, your task is to identify the longest palindromic substring within ‘S’.
If there are multiple longest palindromic ...read more
Find the longest palindromic substring in a given string, returning the rightmost one if multiple exist.
Use dynamic programming to check if substrings are palindromes
Iterate through the string and expand around each character to find palindromic substrings
Keep track of the longest palindromic substring found
Q3. Count Sequences With Product X Problem Statement
You are provided with an array NUM
containing N
positive integers. Your objective is to find the total number of possible sequences of positive integers (greater...read more
Count the total number of possible sequences of positive integers whose product equals X.
Calculate the product X using the given formula
Find all the divisors of X
Count the number of sequences with product X by considering the divisors
Q4. Merge Sort Problem Statement
You are given a sequence of numbers, ARR
. Your task is to return a sorted sequence of ARR
in non-descending order using the Merge Sort algorithm.
Explanation:
The Merge Sort algorit...read more
Implement Merge Sort algorithm to sort a sequence of numbers in non-descending order.
Divide the input array into two halves recursively until each array has only one element.
Merge the sorted halves to produce a completely sorted array.
Time complexity of Merge Sort is O(n log n).
Example: Input: [3, 1, 4, 1, 5], Output: [1, 1, 3, 4, 5]
Q5. Encode the Message Problem Statement
Given a text message, your task is to return the Run-length Encoding of the given message.
Run-length encoding is a fast and simple method of encoding strings, representing ...read more
Implement a function to encode a text message using run-length encoding.
Iterate through the message and count consecutive characters
Append the character and its count to the encoded message
Handle edge cases like single characters or empty message
An abstract class is a class that cannot be instantiated and is meant to be subclassed.
An abstract class serves as a blueprint for other classes.
It can have both abstract and non-abstract methods.
Abstract methods are declared without an implementation and must be implemented by the subclasses.
An abstract class can have instance variables and constructors.
It provides a common interface for all its subclasses.
Inheritance is a mechanism in object-oriented programming where a class inherits properties and behaviors from another class.
Inheritance allows code reuse and promotes code organization.
A derived class can inherit from a base class and extend or modify its functionality.
In C#, inheritance is achieved using the 'class' keyword and the ':' symbol.
Example: class Dog : Animal { }
The derived class can access the public and protected members of the base class.
A class is a blueprint for creating objects in object-oriented programming.
A class is a template that defines the properties and behaviors of objects.
It encapsulates data and methods that operate on that data.
Objects are instances of a class, created using the class blueprint.
Classes support inheritance, allowing for the creation of subclasses with additional or modified functionality.
A destructor is a special member function in object-oriented programming that is used to destroy an object.
Destructors are called automatically when an object goes out of scope or is explicitly deleted.
They are used to release resources held by the object, such as memory or file handles.
Destructors have the same name as the class preceded by a tilde (~).
They do not have return types or parameters.
Example: class MyClass { ~MyClass() { // destructor code } };
An interface is a programming construct that defines a contract for classes to implement certain methods or behaviors.
An interface provides a way to achieve multiple inheritance in programming languages that do not support it.
Interfaces are used to achieve loose coupling and promote code reusability.
Classes that implement an interface must provide an implementation for all the methods defined in the interface.
Interfaces can also contain constants and default method implementa...read more
Q11. What is the process to find a substring within an array?
To find a substring within an array of strings, iterate through each string and check if the substring exists in each string.
Iterate through each string in the array
Use the indexOf() method to check if the substring exists in each string
Return the index of the string if the substring is found, otherwise return -1
Q12. what is Maven? where it used ? what it use case ?
Maven is a build automation tool used primarily for Java projects to manage dependencies, build processes, and project documentation.
Maven is used to manage project dependencies by automatically downloading required libraries from repositories.
It simplifies the build process by providing a standard way to build, test, and package projects.
Maven uses a project object model (POM) file to define project structure, dependencies, and build configurations.
It is commonly used in Jav...read more
Q13. What is difference between list and tuples in python
Lists are mutable, tuples are immutable in Python.
Lists are enclosed in square brackets [], tuples are enclosed in parentheses ().
Lists can be modified (add, remove, change elements), tuples cannot be modified once created.
Lists are slower than tuples for iteration and indexing.
Example: list_example = [1, 2, 3], tuple_example = (4, 5, 6)
Q14. What is new technologies introduced in python
Python has introduced new technologies like asyncio, type hints, data classes, and more.
Asyncio for asynchronous programming
Type hints for static type checking
Data classes for creating classes with less boilerplate code
Q15. JDBC ? HOW WE USE IT ?
JDBC is a Java API for connecting and executing SQL queries on a database.
JDBC stands for Java Database Connectivity.
It allows Java programs to interact with databases.
We use JDBC by loading the driver, establishing a connection, creating a statement, executing queries, and handling results.
Example: Class.forName("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/database", "username", "password");
Q16. Why power Bi is better over others
Power BI is better than others due to its user-friendly interface, powerful data visualization capabilities, and seamless integration with other Microsoft products.
User-friendly interface allows for easy data analysis and visualization
Powerful data visualization capabilities help in creating insightful reports and dashboards
Seamless integration with other Microsoft products like Excel, Azure, and Dynamics 365 enhances productivity and collaboration
Q17. Like write the small codes
Demonstrate coding skills with small code snippets
Use loops to iterate through arrays or perform repetitive tasks
Implement basic algorithms like sorting or searching
Show understanding of data structures like arrays, strings, or objects
Q18. What is primary key in sql
Primary key in SQL is a unique identifier for each record in a table.
Primary key ensures each record in a table is unique
It can be a single column or a combination of columns
Primary key values cannot be NULL
Example: 'id' column in a 'users' table can be a primary key
Q19. Controller specification of previous projects
Designed and implemented controllers for various projects using MVC architecture
Utilized MVC design pattern to separate concerns and improve code maintainability
Implemented controller logic to handle user input and interact with models and views
Ensured controllers were properly tested and integrated with the rest of the application
Q20. What is virtual unction
Virtual function is a function in a base class that is overridden in a derived class.
Virtual functions allow a derived class to provide a specific implementation of a function that is already defined in a base class.
They are used in polymorphism to achieve runtime binding.
The base class function must be declared as virtual for a function in a derived class to be considered as overriding it.
Q21. What is friendly function
A friendly function is a function that is not a member of a class but has access to its private and protected members.
Allows a function to access private and protected members of a class
Declared with the 'friend' keyword in the class definition
Not a member of the class itself
Q22. What is software development
Software development is the process of creating, designing, testing, and maintaining software applications.
Involves writing code to create software applications
Includes designing the user interface and user experience
Testing the software for bugs and errors
Maintaining and updating the software as needed
Q23. What is Cloud computing
Cloud computing is the delivery of computing services over the internet, including storage, servers, databases, networking, software, and more.
Allows users to access and use resources on-demand
Reduces the need for physical hardware and infrastructure
Provides scalability and flexibility for businesses
Examples: Amazon Web Services (AWS), Microsoft Azure, Google Cloud Platform
Q24. What is clss
Class is a blueprint for creating objects in object-oriented programming.
A class defines a set of attributes and methods that an object can have.
Objects are instances of a class.
Classes can inherit attributes and methods from other classes.
Encapsulation, inheritance, and polymorphism are key concepts in OOP.
Example: class Car { String make; int year; void start() { ... } }
Q25. What is inheritance
Inheritance is a mechanism in object-oriented programming where a new class is created by inheriting properties of an existing class.
Inheritance allows code reuse and promotes code organization.
The existing class is called the parent or superclass, and the new class is called the child or subclass.
The child class can access all the public and protected methods and variables of the parent class.
The child class can also override the methods of the parent class to provide its ow...read more
Q26. What is distructor
Destructor is a special member function that gets called automatically when an object is destroyed.
It is used to release resources that were acquired by the object during its lifetime.
It has the same name as the class preceded by a tilde (~).
It cannot have any parameters or a return type.
Example: ~MyClass() {}
It is called automatically when an object goes out of scope or is explicitly deleted.
Q27. What is interface
An interface is a contract that specifies the methods that a class must implement.
Interfaces define a set of methods that a class must implement.
Classes can implement multiple interfaces.
Interfaces can be used to achieve polymorphism.
Interfaces are declared using the 'interface' keyword.
Example: 'public interface MyInterface { void myMethod(); }'
Q28. What is oops in java
Object-oriented programming concepts in Java
OOPs stands for Object-Oriented Programming
Key concepts include classes, objects, inheritance, polymorphism, encapsulation
Java is an OOP language with support for these concepts
Example: Class Car with properties like make, model and methods like drive()
Q29. What is bundling
Bundling is the process of combining multiple files or resources into a single file for more efficient delivery.
Bundling helps reduce the number of HTTP requests needed to load a web page.
It can improve performance by reducing latency and bandwidth usage.
Common tools for bundling in web development include Webpack and Parcel.
Q30. What is minification
Minification is the process of removing unnecessary characters from code without affecting its functionality.
Minification reduces file size by removing comments, whitespace, and renaming variables.
It helps improve website loading speed and performance.
Example: Minified JavaScript code: var x=document.getElementById('demo');x.innerHTML='Hello World';
Q31. What is flutter
Flutter is a UI toolkit for building natively compiled applications for mobile, web, and desktop from a single codebase.
Developed by Google
Uses Dart programming language
Hot reload feature for quick development
Supports iOS, Android, Web, and Desktop platforms
Provides a rich set of pre-built widgets
Q32. Code for sorting algo
Code for sorting an array of strings
Use a sorting algorithm like bubble sort, insertion sort, or merge sort
Compare strings using a comparison function
Repeat the sorting process until the array is sorted
Q33. Reverse Array of sorted
Reverse the order of elements in a sorted array of strings.
Iterate through the array from both ends and swap elements until reaching the middle.
Use a temporary variable to store the value of the element being swapped.
Example: Input array ['apple', 'banana', 'cherry', 'date'] should be reversed to ['date', 'cherry', 'banana', 'apple'].
Q34. Left side of Binary Tree
The left side of a binary tree refers to all the nodes that are on the left side of the root node.
The left side of a binary tree can be accessed by traversing the tree starting from the root node and moving to the left child nodes.
Nodes on the left side of a binary tree have a lower value than the root node.
Example: In a binary tree with root node 5, left child node 3, and right child node 8, the left side consists of nodes with values 3 or lower.
Q35. Wt is abstract clss
An abstract class is a class that cannot be instantiated and is used as a base class for other classes.
An abstract class can have abstract and non-abstract methods.
Abstract methods have no implementation and must be implemented by the derived class.
An abstract class can have constructors, instance variables, and static methods.
An abstract class can be used to define a common interface for a group of related classes.
Example: Animal is an abstract class and Dog, Cat, and Bird a...read more
Top HR Questions asked in RAICAM
Interview Process at RAICAM
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month