Add office photos
Times Internet logo
Employer?
Claim Account for FREE

Times Internet

3.6
based on 666 Reviews
Video summary
Filter interviews by
Designation
Fresher
Experienced
Skills

50+ Times Internet Interview Questions and Answers

Updated 10 Jan 2025
Popular Designations

Q1. Largest Prime Factor Problem Statement

You are given a positive integer n. Your task is to identify the largest prime factor of this given positive integer.

If there is no prime factor for a given integer, outp...read more

Ans.

Identify the largest prime factor of a given positive integer.

  • Iterate from 2 to sqrt(n) to find prime factors

  • Check if each factor is prime and update largest prime factor

  • If no prime factor found, output -1

Add your answer
right arrow

Q2. Clone Linked List with Random Pointer Problem Statement

Given a linked list where each node has two pointers: one pointing to the next node and another which can point randomly to any node in the list or null, ...read more

Ans.

Yes, the cloning of a linked list with random pointer can be accomplished without utilizing extra space.

  • Use a hashmap to store the mapping between original nodes and their corresponding cloned nodes.

  • Iterate through the original linked list to create the cloned nodes and update the hashmap.

  • Iterate through the original linked list again to set the next and random pointers of the cloned nodes using the hashmap.

  • Time complexity: O(N), Space complexity: O(N) where N is the number o...read more

Add your answer
right arrow
Times Internet Interview Questions and Answers for Freshers
illustration image

Q3. First Missing Positive Problem Statement

You are provided with an integer array ARR of length 'N'. Your objective is to determine the first missing positive integer using linear time and constant space. This me...read more

Ans.

Find the smallest positive integer missing from an array of integers.

  • Iterate through the array and mark positive integers as visited using index as a reference.

  • After marking, iterate again to find the first unmarked index which represents the missing positive integer.

  • Handle edge cases like duplicates and negative numbers appropriately.

  • Example: For input [3, 4, -1, 1], the output should be 2.

Add your answer
right arrow

Q4. Binary Array Sorting Problem Statement

You are provided with a binary array, i.e., an array containing only 0s and 1s. Your task is to sort this binary array and return it after sorting.

Input:

 The first line ...read more
Ans.

Yes, the binary array sorting problem can be solved in linear time and constant space by using a two-pointer approach.

  • Use two pointers, one starting from the beginning of the array and the other starting from the end.

  • Swap 0s to the left side and 1s to the right side by incrementing and decrementing the pointers accordingly.

  • Continue this process until the two pointers meet in the middle of the array.

  • Example: Input: [1, 0, 1, 0, 1], Output: [0, 0, 1, 1, 1]

Add your answer
right arrow
Discover Times Internet interview dos and don'ts from real experiences

Q5. 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 more
Ans.

Balls 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

Add your answer
right arrow

Q6. Delete Node in Binary Search Tree Problem Statement

You are provided with a Binary Search Tree (BST) containing 'N' nodes with integer data. Your task is to remove a given node from this BST.

A BST is a binary ...read more

Ans.

Delete a given node from a Binary Search Tree (BST) and return the inorder traversal of the modified BST.

  • Traverse the BST to find the node to be deleted.

  • Handle different cases like node with no children, one child, or two children.

  • Update the pointers of the parent node and child nodes accordingly.

  • Perform inorder traversal after deletion to get the modified BST.

Add your answer
right arrow
Are these interview questions helpful?

Q7. Binary Search Tree Insertion

Given the root node of a binary search tree and a positive integer, you need to insert a new node with the given value into the BST so that the resulting tree maintains the properti...read more

Ans.

Insert a new node with a given value into a binary search tree while maintaining the properties of a BST.

  • Traverse the BST starting from the root node and compare the value to be inserted with each node's value to determine the correct position for insertion.

  • Insert the new node as a leaf node in the appropriate position to maintain the BST properties.

  • Ensure that the resulting tree is a valid binary search tree by following the properties of a BST.

  • Example: Inserting value 60 in...read more

Add your answer
right arrow

Q8. Maximum Subarray Sum Problem Statement

Given an array arr of length N consisting of integers, find the sum of the subarray (including empty subarray) with the maximum sum among all subarrays.

Explanation:

A sub...read more

Ans.

Find the sum of the subarray with the maximum sum among all subarrays in a given array.

  • Iterate through the array and keep track of the maximum sum subarray encountered so far.

  • Use Kadane's algorithm to efficiently find the maximum subarray sum.

  • Consider the case where all elements in the array are negative.

  • Handle the case where the array contains only one element.

Add your answer
right arrow
Share interview questions and help millions of jobseekers 🌟
man with laptop

Q9. Find the second largest prime number from a given array of positive integers. Also return it's index in most optimal way

Ans.

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

Add your answer
right arrow

Q10. 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.

Ans.

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.

Add your answer
right arrow

Q11. Which data structure would i use to program a jigsaw puzzle program and what methods would i use to solve the puzzle

Ans.

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.

Add your answer
right arrow

Q12. 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

Ans.

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.

Add your answer
right arrow

Q13. Given an array of positive and negative integers, find the first missing positive number in the most optimal way

Ans.

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

Add your answer
right arrow
Q14. What is polymorphism in object-oriented programming?
Ans.

Polymorphism in OOP allows objects of different classes to be treated as objects of a common superclass.

  • Polymorphism allows for flexibility and reusability in code.

  • It enables a single interface to be used for different data types.

  • Examples include method overriding and method overloading.

Add your answer
right arrow
Q15. What is the difference between method overloading and method overriding?
Ans.

Method overloading is having multiple methods in the same class with the same name but different parameters. Method overriding is having a method in a subclass with the same name and parameters as a method in its superclass.

  • Method overloading involves multiple methods with the same name but different parameters.

  • Method overriding involves a subclass redefining a method from its superclass with the same name and parameters.

  • Method overloading is resolved at compile time based on...read more

Add your answer
right arrow

Q16. 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

Ans.

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

Add your answer
right arrow

Q17. What is operator overloading?. Give an example

Ans.

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

Add your answer
right arrow

Q18. 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

Ans.

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

Add your answer
right arrow

Q19. What are the basic concepts of JavaScript, including the event loop, variable hoisting, and closures?

Ans.

JavaScript concepts like event loop, variable hoisting, and closures are fundamental for understanding the language.

  • Event loop is responsible for managing the execution of code in JavaScript, ensuring non-blocking behavior.

  • Variable hoisting allows variables to be declared anywhere in a function, with their declarations moved to the top during compilation.

  • Closures allow functions to access variables from their outer scope even after the outer function has finished executing.

Add your answer
right arrow

Q20. What has been your experience with state management libraries such as Redux, and how does data flow within these libraries?

Ans.

Experience with Redux for state management and data flow

  • Used Redux for managing state in complex web applications

  • Understand concepts like actions, reducers, and store in Redux

  • Data flows in a unidirectional manner within Redux, with actions triggering state changes through reducers

  • Example: Dispatching an action to update a user's profile information in Redux store

Add your answer
right arrow

Q21. Differentiate between method overloading and method overriding

Ans.

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

Add your answer
right arrow
Q22. Can you explain how to implement a ViewModel in Android?
Ans.

ViewModel in Android is a class that is responsible for preparing and managing data for an activity or fragment.

  • ViewModel is part of the Android Architecture Components and is used to store and manage UI-related data in a lifecycle-conscious way.

  • It survives configuration changes such as screen rotations and retains data during the lifecycle of the activity or fragment.

  • ViewModel should never hold a reference to a view or any class that has a reference to the activity context t...read more

Add your answer
right arrow

Q23. How would you Designing a web marketing campaign for times internet?

Ans.

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

View 1 answer
right arrow

Q24. What strategies can be employed to optimize the performance of a React application?

Ans.

Optimizing React application performance through various strategies.

  • Code splitting to reduce initial load time

  • Using shouldComponentUpdate or React.memo for efficient rendering

  • Implementing virtualized lists for large data sets

  • Minifying and compressing assets for faster loading

  • Caching data with tools like Redux or useMemo

Add your answer
right arrow

Q25. What is polymorphism with examples

Ans.

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

Add your answer
right arrow
Q26. What is a Binary Search Tree (BST)?
Ans.

A Binary Search Tree (BST) is a data structure where each node has at most two children, with the left child being less than the parent and the right child being greater.

  • Nodes in a BST are arranged in a hierarchical order where the left subtree of a node contains only nodes with keys less than the node's key, and the right subtree contains only nodes with keys greater than the node's key.

  • BST allows for efficient search, insertion, and deletion operations with a time complexit...read more

Add your answer
right arrow

Q27. If you are the manager of the app, how will you create a metric system to keep track of progress?

Ans.

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

Add your answer
right arrow

Q28. given a weather table, write a sql query to find all date's ids with higher temperature compared to it's previous dates

Ans.

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

Add your answer
right arrow

Q29. 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.

Ans.

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

Add your answer
right arrow
Q30. How does RecyclerView work internally?
Ans.

RecyclerView is a flexible view for providing a limited window into a large data set.

  • RecyclerView recycles views to improve performance and memory usage.

  • It uses a LayoutManager to organize and position items within the view.

  • Adapter provides data to be displayed in the RecyclerView.

  • ItemDecoration allows for custom drawing of item decorations like borders or dividers.

View 2 more answers
right arrow
Q31. What is operator overloading?
Ans.

Operator overloading is the ability to redefine the behavior of operators for user-defined data types.

  • Allows operators to be used with custom data types

  • Can define custom behavior for operators like +, -, *, etc.

  • Helps make code more readable and intuitive

  • Example: Overloading the + operator for a custom Vector class to add two vectors

Add your answer
right arrow

Q32. Code assignment to fetch data from API & DOM manipulation using state management libraries

Ans.

Code assignment to fetch data from API & DOM manipulation using state management libraries

  • Use fetch API to make a request to the desired endpoint

  • Utilize state management libraries like Redux or MobX for managing data

  • Update the DOM based on the fetched data using the state management library

Add your answer
right arrow

Q33. How to make salary slip or attendance sheet on excel

Ans.

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

View 1 answer
right arrow

Q34. how is jsp compiled at server end

Ans.

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.

Add your answer
right arrow

Q35. Write a SQL query to find all duplicate emails in a table named person

Ans.

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;

Add your answer
right arrow

Q36. Code Assignment for Field validation in form

Ans.

Implement field validation in a form using code assignment

  • Use HTML form elements like input, select, textarea

  • Use JavaScript to validate user input

  • Display error messages if validation fails

  • Consider using libraries like jQuery Validation for complex validations

Add your answer
right arrow

Q37. How many words can you write?

Ans.

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.

Add your answer
right arrow

Q38. Remove duplicates from array Implement Stack using Queue

Ans.

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<>();

Add your answer
right arrow

Q39. Read data from continuous stream of file

Ans.

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.

Add your answer
right arrow

Q40. What do you know about research

Ans.

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

Add your answer
right arrow

Q41. how is solr indexing done

Ans.

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

Add your answer
right arrow

Q42. Delete a Node in Linked list.

Ans.

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

Add your answer
right arrow

Q43. What is encapsulation?

Ans.

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

Add your answer
right arrow

Q44. what makes the process so important

Ans.

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

Add your answer
right arrow

Q45. What do you know about data

Ans.

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

Add your answer
right arrow

Q46. how to refresh cache

Ans.

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

Add your answer
right arrow

Q47. One Easy DSA problem Code

Ans.

Implement a function to reverse a string in place

  • Create two pointers, one at the start of the string and one at the end

  • Swap characters at the two pointers and move them towards the center until they meet

Add your answer
right arrow

Q48. Can you speak English fluently

Ans.

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.

Add your answer
right arrow

Q49. cron job for cache sync

Ans.

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

Add your answer
right arrow

Q50. why is testing required

Ans.

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

Add your answer
right arrow

Q51. Different between C and C++

Ans.

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.

Add your answer
right arrow

Q52. How will you deliver revenue

Ans.

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

Add your answer
right arrow

Q53. create custom linked list

Ans.

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);

Add your answer
right arrow

Q54. Biggest campaign

Ans.

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

Add your answer
right arrow
Contribute & help others!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos

Interview Process at Times Internet

based on 40 interviews
Interview experience
3.9
Good
View more
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

Capgemini Logo
3.7
 • 3k Interview Questions
DXC Technology Logo
3.7
 • 423 Interview Questions
Maruti Suzuki Logo
4.2
 • 370 Interview Questions
Synechron Logo
3.5
 • 253 Interview Questions
KPIT Technologies Logo
3.4
 • 166 Interview Questions
Statestreet HCL Services Logo
3.3
 • 142 Interview Questions
View all
Recently Viewed
SALARIES
Matrimony.com
SALARIES
Matrimony.com
REVIEWS
Matrimony.com
No Reviews
INTERVIEWS
Matrimony.com
No Interviews
INTERVIEWS
Matrimony.com
No Interviews
INTERVIEWS
Matrimony.com
No Interviews
INTERVIEWS
Videocon d2h
5.6k top interview questions
INTERVIEWS
Matrimony.com
30 top interview questions
REVIEWS
Matrimony.com
No Reviews
LIST OF COMPANIES
Videocon d2h
Locations
Top Times Internet Interview Questions And Answers
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter