Times Internet
50+ Birla Corporation Interview Questions and Answers
There are 20 red balls and 16 blue balls in a bag. Any 2 balls are removed at each step and are replaced with a new ball on the basis of the following conditions:
If they are of the same color, then they a...read more
You are given an array 'ARR' of integers of length N. Your task is to find the first missing positive integer in linear time and constant space. In other words, find the lowest positive in...read more
Given a linked list having two pointers in each node. The first one points to the next node of the list, however, the other pointer is random and can point to any node of th...read more
You are given a positive integer ‘n’. Your task is to find the largest prime factor of this given positive integer.
Note :
If there is no prime factor of a given integer, then print -1.
Inp...read more
A binary array is an array consisting of only 0s and 1s.
You are given a binary array "arr" of size ‘N’. Your task is to sort the given array and return this array after sorting.
Input Forma...read more
You are given an array (ARR) of length N, consisting of integers. You have to find the sum of the subarray (including empty subarray) having maximum sum among all subarrays.
A subarray is a ...read more
You have been given a Binary Search Tree of integers with ‘N’ nodes. You are also given data of a node of this tree. Your task is to delete the given node from the BST.
A binary search tree (B...read more
Q8. 20 red balls and 16 blue balls are present in a bag. 2 balls are removed, if they are of the same color, then they are replaced by a red ball. If they are of different color, then they are replaced with a blue ...
read moreBalls are removed and replaced based on color. Find the last ball remaining.
Start with 20 red and 16 blue balls
Remove 2 balls and replace based on color
Repeat until only one ball remains
You have been given a root node of the binary search tree and a positive integer value. You need to perform an insertion operation i.e. inserting a new node with the given value ...read more
You are provided with 8 identical balls and a measuring instrument. 7 of the eight balls are equal in weight and one of the eight given balls is defective and weighs heavier. The task is to find the defec...read more
Q11. Find the second largest prime number from a given array of positive integers. Also return it's index in most optimal way
Find the second largest prime number and its index from an array of positive integers.
Iterate through the array and check if each number is prime
Store the largest and second largest prime numbers found so far
Also store their indices
Return the second largest prime number and its index
Q12. If a person travels from point A to point B at 20 km/h and returns at 30 km/h, calculate the average speed without using pen and paper.
The average speed can be calculated by taking the harmonic mean of the two speeds.
To calculate the harmonic mean, divide the sum of the speeds by the reciprocal of the sum of their reciprocals.
In this case, the harmonic mean can be calculated as 2/(1/20 + 1/30) = 24 km/h.
Q13. Which data structure would i use to program a jigsaw puzzle program and what methods would i use to solve the puzzle
The data structure to program a jigsaw puzzle program would be a graph.
Use a graph data structure to represent the puzzle pieces and their connections.
Each puzzle piece can be represented as a node in the graph.
Edges between nodes represent the connections between puzzle pieces.
To solve the puzzle, use graph traversal algorithms like depth-first search or breadth-first search.
Apply puzzle-solving strategies like finding corner pieces first or matching edge colors.
Q14. Given 8 balls of the same properties and one of these balls is defective and is heavier than the others. Calculate the minimum no. of steps to find the defective ball
The minimum number of steps to find the defective ball is 2.
Divide the 8 balls into 3 groups of 3, 3, and 2 balls.
Compare the weights of the two groups of 3 balls.
If one group is heavier, divide it into 2 balls and compare their weights.
If the two balls have different weights, the heavier ball is the defective one.
If the two balls have the same weight, the remaining ball in the first group of 3 is the defective one.
Q15. Given an array of positive and negative integers, find the first missing positive number in the most optimal way
Find the first missing positive number in an array of positive and negative integers.
Sort the array in ascending order
Iterate through the sorted array and find the first positive number that is missing
If no positive number is missing, return the next positive number after the largest positive number in the array
If a person travels from point A to point B at 20 km/h and returns at 30 km/h, calculate the average speed without using pen and paper.
Q17. What is a Tree/binary search tree, How to perform add, delete operation in BST, whats the time complexity, asked to write complete code on paper
BST is a binary tree where left child is smaller and right child is greater. Add/delete ops maintain this property.
BST is a data structure used for searching, sorting, and storing data
Add operation: Traverse the tree and find the appropriate position to insert the new node
Delete operation: Find the node to be deleted, replace it with its inorder successor or predecessor, and delete the successor/predecessor node
Time complexity: O(log n) for both add and delete operations
Code ...read more
Q18. What is operator overloading?. Give an example
Operator overloading is the ability to redefine operators for custom classes.
Allows operators to be used with custom classes
Example: '+' operator can be used to concatenate strings
Can improve readability and simplify code
What is operator overloading?
Differentiate between method overloading and method overriding
How recycler view works internally?
Q22. Make a copy of linked list with a random pointer pointing to random node in the linked list, asked to write pseudo code for it
Copy a linked list with random pointers to random nodes in the list.
Create a new node for each node in the original list
Map the original nodes to their corresponding new nodes
Copy the value of the original node to the new node
Copy the random pointer of the original node to the new node using the mapping created earlier
What is Polymorphism?
Q24. Differentiate between method overloading and method overriding
Method overloading is having multiple methods with the same name but different parameters. Method overriding is having a method in a subclass with the same name, return type, and parameters as a method in its superclass.
Method overloading is achieved within the same class.
Method overriding occurs in a subclass that inherits from a superclass.
Method overloading is determined at compile-time based on the number, type, and order of parameters.
Method overriding is determined at r...read more
Q26. How would you Designing a web marketing campaign for times internet?
To design a web marketing campaign for Times Internet, I would focus on targeted advertising, content marketing, social media promotion, and data analysis.
Identify the target audience and create buyer personas
Develop a comprehensive content marketing strategy to engage and educate the audience
Utilize targeted advertising platforms like Google Ads and Facebook Ads to reach the desired audience
Leverage social media platforms to promote the campaign and engage with the audience
I...read more
What is a view model? What are its advantages?
Q28. What is polymorphism with examples
Polymorphism is the ability of an object to take on many forms. It allows objects of different classes to be treated as the same type.
Polymorphism is achieved through method overriding and method overloading.
Method overriding allows a subclass to provide a specific implementation of a method that is already defined in its superclass.
Method overloading allows multiple methods with the same name but different parameters to be defined in a class.
Polymorphism enables code reusabi...read more
Q29. If you are the manager of the app, how will you create a metric system to keep track of progress?
Create a metric system to track progress of app as a manager.
Identify key performance indicators (KPIs) such as user acquisition, retention, engagement, and revenue
Set specific goals for each KPI and track progress regularly
Use analytics tools to gather data and generate reports
Analyze data to identify areas for improvement and make data-driven decisions
Communicate progress and insights to stakeholders regularly
Q30. given a weather table, write a sql query to find all date's ids with higher temperature compared to it's previous dates
SQL query to find date ids with higher temperature compared to previous dates in weather table
Use self join to compare temperature of current date with previous dates
Order the table by date to ensure correct comparison
Select date ids where temperature is higher than previous dates
Q31. Data structure and algorithm : find maximum sum subarray. Separate zeroes and ones in array. Android questions : viewmodel under the hood, recycler view under the hood, implement viewmodel.
Questions on data structure, algorithm, and Android development.
To find maximum sum subarray, use Kadane's algorithm
To separate zeroes and ones in array, use two pointers approach
ViewModel is a class that stores and manages UI-related data
RecyclerView is a flexible view for providing a limited window into a large data set
To implement ViewModel, extend ViewModel class and override onCleared() method
Q32. How to make salary slip or attendance sheet on excel
To create a salary slip or attendance sheet on Excel, use formulas for calculations and formatting for a professional look.
Use Excel functions like SUM, AVERAGE, and IF for calculations
Format cells for dates, currency, and percentages
Include employee details like name, ID, and department
Add columns for salary components like basic pay, allowances, and deductions
Use conditional formatting for attendance tracking
Q33. how is jsp compiled at server end
JSP is compiled into servlets by the server at runtime.
JSP pages are first translated into Java code by the JSP compiler.
The Java code is then compiled into servlets by the server at runtime.
The servlets are then executed to generate dynamic content for the client.
Compilation can be done automatically or manually depending on the server configuration.
Q34. Write a SQL query to find all duplicate emails in a table named person
SQL query to find duplicate emails in a table named person
Use GROUP BY and HAVING clause to group emails and count their occurrences
Select only those emails which have count greater than 1
Example: SELECT email, COUNT(*) FROM person GROUP BY email HAVING COUNT(*) > 1;
Q36. How many words can you write?
I can write a large number of words per day, depending on the topic and deadline.
I have experience writing articles, blog posts, and social media content.
I am able to write quickly and efficiently without sacrificing quality.
My average output is around 1500-2000 words per day, but I can write more if needed.
I am comfortable with various writing styles and can adapt to different tones and audiences.
Q37. Remove duplicates from array Implement Stack using Queue
Remove duplicates from array and implement Stack using Queue
To remove duplicates, use a HashSet or sort the array and iterate through it
To implement Stack using Queue, use two Queues and switch elements between them
Example: String[] arr = {"apple", "banana", "orange", "apple"};
Example: Queue
queue1 = new LinkedList<>(); Example: Stack
stack = new Stack<>();
Q38. Read data from continuous stream of file
To read data from a continuous stream of file, we can use tools like tail or Apache Kafka.
Tail command can be used to read the last n lines of a file and follow the growth of the file.
Apache Kafka is a distributed streaming platform that can be used to read data from a continuous stream of files.
We can also use programming languages like Python or Java to read data from a continuous stream of files.
Q39. What do you know about research
Research involves systematic investigation, analysis, and interpretation of data to answer specific questions or solve problems.
Research involves gathering information through various methods such as surveys, experiments, and observations
It requires analyzing and interpreting data to draw conclusions and make recommendations
Research helps in expanding knowledge, solving problems, and making informed decisions
Examples of research include market research to understand consumer ...read more
Q40. how is solr indexing done
Solr indexing is the process of adding documents to the Solr search engine for efficient retrieval.
Solr indexing involves creating a schema that defines the fields to be indexed
Documents are then added to the index using the Solr API or a data import handler
Solr uses inverted indexes to quickly search for documents matching a query
Indexing can be optimized by using techniques like sharding and replication
Q41. Delete a Node in Linked list.
To delete a node in a linked list, we need to find the node and update the pointers of its previous and next nodes.
Find the node to be deleted by traversing the linked list
Update the pointers of the previous and next nodes to skip the node to be deleted
Free the memory occupied by the node to be deleted
Q42. What is encapsulation?
Encapsulation is the process of hiding implementation details and exposing only necessary information to the user.
Encapsulation is achieved through access modifiers like public, private, and protected.
It helps in achieving data abstraction and information hiding.
Encapsulation provides better control over the data and prevents unauthorized access.
Example: A class with private variables and public methods to access those variables.
Example: A capsule that contains medicine and o...read more
Q43. what makes the process so important
The process is important because it ensures quality, efficiency, and consistency in the outcome.
Ensures quality control by following specific steps and guidelines
Improves efficiency by streamlining tasks and reducing errors
Maintains consistency in the outcome by standardizing procedures
Helps in identifying and resolving issues early in the development cycle
Q44. What do you know about data
Data refers to facts, statistics, or information collected for analysis or reference.
Data can be structured or unstructured
Data can be quantitative or qualitative
Data analysis involves cleaning, transforming, and interpreting data
Examples of data sources include databases, surveys, and social media
Data visualization helps in presenting data in a visual format
Q45. how to refresh cache
To refresh cache, clear the cache or set a new expiration time.
Clear the cache by deleting all cached data
Set a new expiration time for the cache
Use cache busting techniques to force a refresh
Implement server-side cache invalidation
Use a CDN to serve cached content
Q46. Can you speak English fluently
Yes, I am fluent in English and have strong communication skills.
I am a native English speaker and have been speaking English fluently for many years.
I have experience communicating complex data analysis findings in English.
I have received positive feedback on my English communication skills in previous roles.
Q47. cron job for cache sync
A cron job can be used to automate cache synchronization at regular intervals.
Set up a cron job to run a script that clears and updates the cache
Specify the frequency of the cron job based on the cache update frequency
Ensure that the script is error-free and logs any issues for debugging
Consider using a distributed cache system for better performance
Example: */5 * * * * /path/to/script.sh
Q48. why is testing required
Testing is required to ensure the quality and functionality of software applications.
Identify defects and bugs in the software
Ensure the software meets the requirements and specifications
Verify that the software functions correctly under different scenarios
Improve user experience and satisfaction
Reduce the risk of software failures and issues
Examples: Regression testing, performance testing, usability testing
Q49. Different between C and C++
C++ is an extension of C with object-oriented programming features.
C++ supports classes and objects while C does not.
C++ has better support for polymorphism and inheritance.
C++ has a standard template library (STL) while C does not.
C++ allows function overloading while C does not.
C++ has exception handling while C does not.
Q50. How will you deliver revenue
I will deliver revenue by building strong relationships with clients, identifying their needs, and providing tailored solutions.
Developing and maintaining relationships with existing clients to upsell and cross-sell products/services
Identifying new business opportunities and pitching products/services to potential clients
Analyzing market trends and competitor activities to adjust sales strategies accordingly
Collaborating with internal teams to ensure client satisfaction and r...read more
Q51. create custom linked list
A custom linked list is a data structure where each node contains a value and a reference to the next node.
Define a Node class with value and next properties
Define a LinkedList class with head property and methods to add, remove, and traverse nodes
Example: let list = new LinkedList(); list.add(1); list.add(2); list.remove(1);
Q52. Biggest campaign
My biggest campaign was a nationwide marketing campaign for a new product launch.
Developed comprehensive marketing strategy
Utilized multiple channels such as social media, TV, and print advertising
Collaborated with influencers and brand ambassadors
Analyzed data and adjusted tactics for optimal results
Top HR Questions asked in Birla Corporation
Interview Process at Birla Corporation
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month