Add office photos
Employer?
Claim Account for FREE

Google

4.4
based on 1.9k Reviews
Video summary
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by

400+ LUK Enterprises Interview Questions and Answers

Updated 26 Feb 2025
Popular Designations

Q101. input: { type: file, filename: in.txt } mode: strict output: { type: service, server: { hostname: myserver.com } person: { age: 12 } } How would you represent data of this kind in memory ?

Ans.

The data can be represented in memory using a combination of data structures like objects and arrays.

  • Use objects to represent the input, output, server, and person data

  • Use arrays to store multiple values like filenames or hostnames

  • Use key-value pairs to store specific information like age or type

Add your answer

Q102. How to convince engineers that a certain rate was acceptable or not?

Ans.

To convince engineers about acceptable rate

  • Provide data and analysis to support the decision

  • Explain the impact of the rate on the product and its users

  • Collaborate with the engineers to find a mutually acceptable rate

  • Consider the technical limitations and feasibility

  • Communicate clearly and transparently

  • Provide alternatives and options

  • Consider the market and competition

  • Be open to feedback and suggestions

Add your answer

Q103. Explain the difference between ArrayList and LinkedList in Java. When would you choose one over the other?

Ans.

ArrayList and LinkedList are both classes in Java that implement the List interface, but they have different underlying data structures.

  • ArrayList uses a dynamic array to store elements, providing fast random access but slower insertion and deletion.

  • LinkedList uses a doubly linked list to store elements, providing fast insertion and deletion but slower random access.

  • Choose ArrayList when you need fast random access and know the size of the list beforehand. Choose LinkedList wh...read more

Add your answer

Q104. What is a Java Stream, and how does it differ from an Iterator? Explain how Streams can be used to process collections efficiently.

Ans.

Java Stream is a sequence of elements that supports functional-style operations. It differs from Iterator by allowing for more concise and declarative code.

  • Streams can process elements in a collection in a declarative way, allowing for functional-style operations like map, filter, and reduce.

  • Streams do not store elements, they operate on the source data structure (e.g., List) directly.

  • Iterators are used to iterate over a collection sequentially, while Streams can perform para...read more

Add your answer
Discover LUK Enterprises interview dos and don'ts from real experiences

Q105. Explain the concept of immutability in Java. How does the String class achieve immutability, and what are the advantages of immutable objects?

Ans.

Immutability in Java means objects cannot be modified after creation. String class achieves immutability by not allowing changes to its value.

  • Immutability means once an object is created, its state cannot be changed.

  • String class achieves immutability by making its value final and not providing any methods to modify it.

  • Advantages of immutable objects include thread safety, caching, and easier debugging.

  • Example: String str = "Hello"; str.concat(" World"); // This does not chang...read more

Add your answer

Q106. What is the difference between final, finally, and finalize in Java? Provide examples to illustrate their usage.

Ans.

final, finally, and finalize have different meanings in Java.

  • final is a keyword used to declare constants, immutable variables, or prevent method overriding.

  • finally is a block used in exception handling to execute code after try-catch block.

  • finalize is a method used for cleanup operations before an object is garbage collected.

Add your answer
Are these interview questions helpful?

Q107. Explain the Singleton design pattern in Java. How can you implement it safely to ensure thread safety?

Ans.

Singleton design pattern ensures a class has only one instance and provides a global point of access to it.

  • Create a private static instance of the class.

  • Provide a public static method to access the instance.

  • Use synchronized keyword or double-checked locking to ensure thread safety.

Add your answer

Q108. Can you explain the difference between method overloading and method overriding in Java? Provide examples where each should be used.

Ans.

Method overloading is when multiple methods have the same name but different parameters, while method overriding is when a subclass provides a specific implementation of a method in its superclass.

  • Method overloading is achieved within the same class by having multiple methods with the same name but different parameters.

  • Method overriding occurs in a subclass that provides a specific implementation of a method that is already provided by its superclass.

  • Method overloading is use...read more

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q109. What are Java annotations, and how are they used in frameworks like Spring? Explain the difference between built-in and custom annotations.

Ans.

Java annotations are metadata that provide data about a program but do not affect the program itself. They are used in frameworks like Spring to configure and customize behavior.

  • Java annotations are used to provide metadata about a program, such as information about classes, methods, or fields.

  • In frameworks like Spring, annotations are used to configure various aspects of the application, such as defining beans, handling transactions, or mapping URLs.

  • Built-in annotations in J...read more

Add your answer

Q110. Imagine you have a closet full of shirts. It’s very hard to find a shirt. So what can you do to organize your shirts for easy retrieval?

Ans.

Sort shirts by color, style, and frequency of use.

  • Separate shirts by color to easily find what you need

  • Organize by style (e.g. t-shirts, button-ups, etc.)

  • Place frequently used shirts at the front for easy access

  • Consider using dividers or shelves to keep shirts neat and tidy

Add your answer

Q111. I was asked to design a handheld device with a screen.

Ans.

Designing a handheld device with a screen.

  • Consider the size and weight of the device for portability.

  • Choose a high-resolution screen for clear display.

  • Include touch screen functionality for ease of use.

  • Ensure long battery life for extended use.

  • Incorporate wireless connectivity for data transfer.

  • Add protective casing for durability.

  • Consider user feedback for continuous improvement.

  • Examples: smartphones, tablets, e-readers.

View 1 answer

Q112. What is the lambda expression in JAVA?

Ans.

Lambda expression in JAVA is a concise way to represent a method implementation using a functional interface.

  • Lambda expressions are used to provide a more concise way to implement functional interfaces in JAVA.

  • They are similar to anonymous classes but with less boilerplate code.

  • Lambda expressions can be used to pass behavior as an argument to a method.

  • Syntax: (parameters) -> expression or (parameters) -> { statements; }

  • Example: (int a, int b) -> a + b

Add your answer

Q113. How to design a search engine? If each document contains a set of keywords, and is associated with a numeric attribute, how to build indices?

Ans.

To design a search engine with keyword-based document indexing and numeric attributes, we need to build appropriate indices.

  • Create an inverted index for each keyword, mapping it to the documents that contain it

  • For numeric attributes, use a B-tree or other appropriate data structure to store the values and their associated documents

  • Combine the indices to allow for complex queries, such as keyword and attribute filters

  • Consider using stemming or other text processing techniques ...read more

Add your answer

Q114. What are the advantages and disadvantages of using Java’s synchronized keyword for thread synchronization? Can you explain how the ReentrantLock compares to synchronized?

Ans.

Using synchronized keyword for thread synchronization in Java has advantages like simplicity and disadvantages like potential for deadlock. ReentrantLock offers more flexibility and control.

  • Advantages of synchronized keyword: simplicity, built-in support in Java

  • Disadvantages of synchronized keyword: potential for deadlock, lack of flexibility

  • ReentrantLock offers more control over locking, ability to try and lock with timeout, ability to create fair locks

  • ReentrantLock can be u...read more

Add your answer

Q115. How does the Java garbage collector work? Can you describe the different types of garbage collection algorithms available in Java?

Ans.

The Java garbage collector is responsible for automatically managing memory by reclaiming unused objects.

  • The garbage collector in Java runs in the background and automatically reclaims memory from objects that are no longer in use.

  • There are different types of garbage collection algorithms in Java, such as Serial, Parallel, CMS, G1, and ZGC.

  • Each garbage collection algorithm has its own characteristics and is suitable for different types of applications and workloads.

Add your answer

Q116. What is the Java Memory Model, and how does it affect multithreading and synchronization? How does volatile help ensure memory visibility?

Ans.

The Java Memory Model defines how threads interact through memory and how synchronization ensures data consistency.

  • Java Memory Model specifies how threads interact with memory, ensuring data consistency

  • It defines rules for reading and writing shared variables in a multithreaded environment

  • Synchronization mechanisms like synchronized blocks and locks ensure proper visibility and ordering of memory operations

  • The 'volatile' keyword in Java ensures that changes made by one thread...read more

Add your answer

Q117. How do Java Streams handle parallel processing? What are the potential pitfalls of using parallel streams, and how can they be mitigated?

Ans.

Java Streams handle parallel processing by splitting the data into multiple chunks and processing them concurrently.

  • Java Streams use the Fork/Join framework to split the data into chunks and process them in parallel.

  • Potential pitfalls include increased overhead due to thread management, potential race conditions, and decreased performance for small datasets.

  • Pitfalls can be mitigated by ensuring thread safety, avoiding stateful operations, and testing performance with differen...read more

Add your answer

Q118. What is the difference between == and .equals() in Java? When should each be used, and what issues can arise from improper usage?

Ans.

In Java, == compares memory addresses while .equals() compares values of objects. Improper usage can lead to unexpected results.

  • Use == to compare primitive data types or check if two objects reference the same memory address.

  • Use .equals() to compare the values of objects, such as strings or custom classes.

  • Improper usage of == with objects can lead to unexpected results as it compares memory addresses, not values.

Add your answer

Q119. What are the main features of Java 8? Can you explain how lambdas and the Stream API have changed the way Java applications are written?

Ans.

Java 8 introduced features like lambdas and Stream API which have revolutionized the way Java applications are written.

  • Lambdas allow for more concise and readable code by enabling functional programming paradigms.

  • Stream API provides a way to process collections of objects in a functional style, making code more expressive and efficient.

  • Java 8 also introduced default methods in interfaces, allowing for backward compatibility without breaking existing code.

  • The new Date and Time...read more

Add your answer

Q120. What are functional interfaces in Java? How do they work with lambda expressions? Provide an example of a custom functional interface.

Ans.

Functional interfaces in Java are interfaces with a single abstract method. They can be used with lambda expressions for functional programming.

  • Functional interfaces have only one abstract method, but can have multiple default or static methods.

  • Lambda expressions can be used to implement the abstract method of a functional interface concisely.

  • An example of a custom functional interface is 'Calculator' with a single abstract method 'calculate'.

Add your answer

Q121. Describe the differences between checked and unchecked exceptions in Java. Provide examples and explain how to handle them properly.

Ans.

Checked exceptions are checked at compile time, while unchecked exceptions are not. Proper handling involves either catching or declaring the exception.

  • Checked exceptions must be either caught or declared in the method signature using the 'throws' keyword.

  • Unchecked exceptions do not need to be caught or declared, but can still be handled using try-catch blocks.

  • Examples of checked exceptions include IOException and ClassNotFoundException, while examples of unchecked exceptions...read more

Add your answer

Q122. 6.What are local variables and global variables in Python? 7.When to use a tuple vs list vs dictionary in Python? 8.Explain some benefits of Python 9.What is Lambda Functions in Python? 10.What is a Negative In...

read more
Ans.

Local variables are variables that are defined within a function and can only be accessed within that function. Global variables are variables that are defined outside of any function and can be accessed throughout the program.

  • Local variables are created when a function is called and destroyed when the function completes.

  • Global variables can be accessed and modified by any function in the program.

  • Using local variables helps in encapsulation and prevents naming conflicts.

  • Globa...read more

Add your answer

Q123. Out of 10 coins, one weighs less than the others. You have a scale. How can you determine which one weighs less in 3 weights? Now how would you do it if you didn't know if the odd coin weighs less or more?

Add your answer

Q124. how can increase immediately sales or marketing figure of a particular company

Ans.

To increase sales or marketing figures immediately, focus on targeted advertising, offering promotions, improving customer experience, and leveraging social media.

  • Implement targeted advertising campaigns to reach the right audience

  • Offer promotions or discounts to attract new customers and incentivize purchases

  • Improve customer experience through excellent service, personalized interactions, and efficient processes

  • Leverage social media platforms to engage with customers, create...read more

View 2 more answers

Q125. Is the initial shortlisting conducted through an Applicant Tracking System (ATS)?

Ans.

Yes, many companies use Applicant Tracking Systems for initial shortlisting.

  • Many companies use ATS to manage and filter large volumes of applications

  • ATS can automatically screen resumes based on keywords and qualifications

  • Some examples of popular ATS include Greenhouse, Lever, and Workday

Add your answer

Q126. What type program language do you know?

Ans.

I am proficient in programming languages such as Java, Python, C++, and JavaScript.

  • Java

  • Python

  • C++

  • JavaScript

View 2 more answers

Q127. What new feature you would like to add in Google maps and how would it help to increase the company's revenue?

Ans.

I would like to add a feature that suggests nearby events and attractions based on user preferences.

  • Personalized event and attraction recommendations

  • Integration with ticketing platforms for revenue sharing

  • Increased user engagement and retention

View 1 answer

Q128. Most phones now have full keyboards. Before there there three letters mapped to a number button. Describe how you would go about implementing spelling and word suggestions as people type

Ans.

Implement spelling and word suggestions for full keyboard phones

  • Create a dictionary of commonly used words

  • Use algorithms like Trie or Levenshtein distance to suggest words

  • Implement auto-correct feature

Add your answer

Q129. If the mean failure hour is 10,000 and 20 is the mean repair hour. If the printer is used by 100 customer, then find the availability? 1)80% 2)90% 3)98% 4)99.8% 5)100%

Ans.

The availability of the printer can be calculated using the formula: Availability = (Mean Time Between Failures) / (Mean Time Between Failures + Mean Time To Repair)

  • Mean failure hour = 10,000

  • Mean repair hour = 20

  • Number of customers = 100

  • Availability = (10,000) / (10,000 + 20)

  • Availability = 0.998

  • Availability = 99.8%

Add your answer

Q130. find position of element which is greater than twice of all other elements

Ans.

Find index of element greater than twice of all other elements in array

  • Iterate through the array to find the maximum element

  • Iterate through the array again to check if any element is greater than twice the maximum element

  • Return the index of the element if found, otherwise return -1

Add your answer

Q131. What is the value of i after execution of the following program? void main() { long l=1024; int i=1; while(l>=1) { l=l/2; i=i+1; } } a)8 b)11 c)10 d)100 ans:b

Ans.

The value of i after execution of the program is 11.

  • The program initializes a long variable l with the value 1024 and an int variable i with the value 1.

  • The while loop divides l by 2 and increments i by 1 until l is less than 1.

  • After 11 iterations, l becomes less than 1 and the loop terminates.

  • Therefore, the value of i at the end is 11.

Add your answer

Q132. For i in pythonlife: If i=='l': Break Print(I)

Ans.

The code will iterate over the characters in 'pythonlife' and print each character until it reaches 'l', then it will stop.

  • The code uses a for loop to iterate over each character in the string 'pythonlife'.

  • When the character 'l' is encountered, the loop will break and stop iterating.

  • The loop will print each character until 'l' is reached, so the output will be 'python'.

Add your answer

Q133. Find the maximum value given an array with numbers and you can jump to any number and the value is jump length multiplied by value at the location.

Ans.

Find the maximum value by jumping to any number and multiplying jump length by value at the location.

  • Iterate through the array and calculate the maximum value for each possible jump

  • Keep track of the maximum value found so far

  • Return the maximum value

View 2 more answers

Q134. Given a configuration stream, parse it in your data structure. interface Tokenizer { bool hasNext(); string nextToken(); }

Ans.

Implement a tokenizer interface to parse a configuration stream into a data structure.

  • Create a class that implements the Tokenizer interface

  • Use the hasNext method to check if there are more tokens to parse

  • Use the nextToken method to retrieve the next token from the stream

  • Store the tokens in a data structure such as a list or map

Add your answer

Q135. Explain Virtual Machine (JVM) architecture.

Ans.

JVM is a virtual machine that enables a computer to run Java programs.

  • JVM is platform-independent and converts Java bytecode into machine code.

  • It consists of class loader, runtime data areas, execution engine, and native method interface.

  • JVM manages memory, garbage collection, and exception handling.

  • Examples of JVM implementations include Oracle HotSpot, OpenJ9, and GraalVM.

Add your answer

Q136. Who are Google competitors, and how does Google compete with them?

Ans.

Google's competitors include search engines like Bing and Yahoo, as well as social media platforms like Facebook and Twitter.

  • Bing and Yahoo are search engines that compete with Google's search engine.

  • Facebook and Twitter are social media platforms that compete with Google's social media platform, Google+.

  • Google also competes with companies like Amazon and Apple in areas such as cloud computing and mobile devices.

  • Google's main strategy for competing with these companies is to ...read more

Add your answer

Q137. Given an array of integers which is circularly sorted, how do you find a given integer

Ans.

To find a given integer in a circularly sorted array of integers, use binary search with slight modifications.

  • Find the middle element of the array.

  • If the middle element is the target, return its index.

  • If the left half of the array is sorted and the target is within that range, search the left half.

  • If the right half of the array is sorted and the target is within that range, search the right half.

  • If the left half is not sorted, search the right half.

  • If the right half is not so...read more

Add your answer

Q138. What is your knowledge of product specifications within the sales industry?

Ans.

I have a strong understanding of product specifications in the sales industry.

  • I am familiar with the technical details and features of the products being sold.

  • I understand how product specifications can influence purchasing decisions.

  • I can effectively communicate product specifications to customers to drive sales.

  • I am knowledgeable about competitor products and how they compare in terms of specifications.

Add your answer

Q139. How can a customer be converted from one brand to another?

Ans.

Customers can be converted from one brand to another through targeted marketing, superior product quality, competitive pricing, and excellent customer service.

  • Identify the customer's pain points with the current brand and offer solutions

  • Highlight the unique selling points of the new brand

  • Provide incentives such as discounts or promotions to encourage the switch

  • Engage with the customer through personalized communication and follow-up

  • Deliver exceptional customer service to buil...read more

Add your answer

Q140. For i in range (0,9): Print(i)

Ans.

The code will print numbers from 0 to 8 in separate lines.

  • The 'range' function generates a sequence of numbers from 0 to 8 (9 is exclusive).

  • The 'for' loop iterates through each number in the sequence and prints it.

View 2 more answers

Q141. What would you say during an AdWords or AdSense product seminar?

Ans.

During an AdWords or AdSense product seminar, I would discuss the importance of targeting the right audience and optimizing ad performance.

  • Explain the different targeting options available in AdWords and AdSense

  • Provide tips for creating effective ad copy and visuals

  • Discuss the importance of tracking and analyzing ad performance data

  • Highlight the benefits of using AdWords and AdSense for businesses

  • Answer any questions and provide real-life examples of successful campaigns

Add your answer

Q142. You have to get from point A to point B. You don’t know if you can get there. What would you do?

Ans.

Assess the situation and explore all possible options to reach point B.

  • Check for alternative routes or modes of transportation.

  • Consult with locals or use GPS to find the best route.

  • Prepare for unexpected obstacles and have a backup plan.

  • Consider the time and resources available.

  • Evaluate the risks and benefits of each option.

Add your answer

Q143. 11.What is the namespace in Python? 12.What is a dictionary in Python? 13.What is type conversion in Python? 14.What is the difference between Python Arrays and lists? 15.What are functions in Python?

Ans.

Answers to common Python interview questions.

  • Namespace is a container for storing variables and functions.

  • Dictionary is a collection of key-value pairs.

  • Type conversion is the process of converting one data type to another.

  • Arrays are homogeneous while lists are heterogeneous.

  • Functions are blocks of code that perform a specific task.

Add your answer

Q144. What do you think Google Operations Center does?

Ans.

Google Operations Center is responsible for managing and monitoring Google's infrastructure and services.

  • Google Operations Center oversees the operation and maintenance of Google's data centers.

  • They monitor the performance and availability of Google's services, such as Google Search, Gmail, and Google Cloud Platform.

  • The center handles incident management and response to ensure minimal downtime and quick resolution of issues.

  • They collaborate with various teams to optimize infr...read more

View 3 more answers

Q145. How would you determine if someone has won a game of tic-tac-toe on a board of any size?

Ans.

To determine if someone has won a game of tic-tac-toe on a board of any size, we need to check all possible winning combinations.

  • Create a function to check all rows, columns, and diagonals for a winning combination

  • Loop through the board and call the function for each row, column, and diagonal

  • If a winning combination is found, return the player who won

  • If no winning combination is found and the board is full, return 'Tie'

  • If no winning combination is found and the board is not f...read more

Add your answer

Q146. What’s a creative way of marketing Google’s brand name and product?

Ans.

One creative way to market Google's brand name and product is through interactive billboards.

  • Create interactive billboards that allow people to search for nearby restaurants, stores, or events using Google Maps.

  • Include fun and engaging games or quizzes that utilize Google's search engine.

  • Partner with local businesses to display ads and promotions on the billboards.

  • Use data analytics to track user engagement and adjust marketing strategies accordingly.

Add your answer

Q147. What is the most efficient way to sort a million integers?

Ans.

The most efficient way to sort a million integers is to use a sorting algorithm with a time complexity of O(n log n).

  • Use quicksort, mergesort, or heapsort.

  • Avoid bubble sort, insertion sort, or selection sort.

  • Consider using parallel processing or distributed computing for even faster sorting.

  • Use built-in sorting functions in programming languages for convenience and efficiency.

Add your answer

Q148. How would you re-position Google’s offerings to counteract competitive threats from Microsoft?

Ans.

Google should focus on improving user experience and expanding into new markets.

  • Improve search algorithms to provide more accurate and relevant results

  • Invest in developing new products and services to diversify revenue streams

  • Expand into emerging markets with tailored offerings

  • Partner with other companies to create integrated solutions

  • Focus on privacy and security to differentiate from competitors

Add your answer

Q149. How much should you charge to wash all the windows in Seattle?

Ans.

The cost of washing all the windows in Seattle depends on various factors such as the number of windows, the size of the windows, and the type of cleaning required.

  • The cost will vary depending on the number of windows that need to be cleaned.

  • The size of the windows will also affect the cost.

  • The type of cleaning required, such as exterior only or interior and exterior, will also impact the cost.

  • Additional factors such as the height of the building and the difficulty of accessi...read more

Add your answer

Q150. How would you find out if a machine’s stack grows up or down in memory?

Ans.

To determine if a machine's stack grows up or down in memory, we can use a simple C program.

  • Create a C program that declares a local variable and prints its address.

  • Call a function and print its address.

  • Compare the two addresses to determine if the stack grows up or down.

  • If the address of the local variable is higher than the function address, the stack grows down. If it's lower, the stack grows up.

Add your answer

Q151. difference between software computing and hardware computing.

Ans.

Software computing involves writing and executing code, while hardware computing involves physical components like processors and memory.

  • Software computing involves writing code to perform tasks, while hardware computing involves physical components like processors and memory.

  • Software computing focuses on algorithms and logic, while hardware computing focuses on the physical execution of those algorithms.

  • Examples of software computing include programming languages like Java o...read more

Add your answer

Q152. How can we establish a relationship with customers to enhance their interaction with our products

Ans.

Establishing a relationship with customers involves personalized communication, excellent customer service, and creating a sense of community around the brand.

  • Utilize personalized communication channels such as email marketing, social media interactions, and personalized recommendations based on customer preferences.

  • Provide excellent customer service by addressing customer inquiries and concerns promptly and effectively.

  • Create a sense of community around the brand by hosting ...read more

Add your answer

Q153. How many resumes does Google receive each year for software engineering?

Add your answer

Q154. How would you increase the sales of newspaper in your locality?

Ans.

To increase newspaper sales in the locality, I would focus on improving content, distribution, and marketing strategies.

  • Conduct market research to understand readers' preferences and interests

  • Create engaging and informative content that caters to the local audience

  • Offer attractive subscription packages and discounts to encourage regular readership

  • Partner with local businesses and events to increase visibility and distribution

  • Invest in targeted advertising and social media cam...read more

Add your answer

Q155. GCP group for merge the projects to reduce the 100 to 25.

Ans.

Create a GCP group to merge projects and reduce from 100 to 25.

  • Identify the projects to be merged based on criteria such as functionality, ownership, or resource usage.

  • Create a new GCP project to serve as the merged project.

  • Migrate the necessary resources and data from the individual projects to the merged project.

  • Update any dependencies or configurations to reflect the changes.

  • Ensure proper access controls and permissions are set up for the merged project.

  • Test and validate t...read more

View 1 answer

Q156. S contains the set of positive integer. Find the largest number c such that c=a+b where a,b,c are district number of the set?

Ans.

The largest number c that can be expressed as the sum of two distinct positive integers from a set.

  • The largest number c will be the sum of the two largest numbers in the set.

  • If the set is {1, 2, 3, 4, 5}, the largest c would be 9 (5+4).

  • If the set is {10, 20, 30, 40, 50}, the largest c would be 90 (50+40).

Add your answer

Q157. Given a list of integers that fall within a known short but unknown range of values, how to find the median value?

Ans.

To find the median value of a list of integers within a known but unknown range, sort the list and find the middle value.

  • Sort the list of integers in ascending order

  • If the list has an odd number of elements, the median is the middle value

  • If the list has an even number of elements, the median is the average of the two middle values

Add your answer

Q158. Given two files that has list of words (one per line), write a program to show the intersection

Ans.

Program to find intersection of words in two files

  • Read both files and store words in two arrays

  • Loop through one array and check if word exists in other array

  • Print the common words

Add your answer

Q159. How many piano tuners are there in the entire world?

Ans.

It is impossible to accurately determine the number of piano tuners in the world.

  • There is no central database or registry for piano tuners worldwide.

  • The number of piano tuners varies greatly by country and region.

  • Factors such as population density, cultural attitudes towards music, and economic conditions can all impact the number of piano tuners in a given area.

  • Estimates of the total number of piano tuners in the world range from tens of thousands to hundreds of thousands.

  • It...read more

Add your answer

Q160. 1. What is Python? 2. What Are Python Advantages? 3. Why do you we use in python Function? 4. What is the break Statement? 5. What is tuple in python?

Ans.

Python is a high-level, interpreted programming language known for its simplicity, readability, and versatility.

  • Python is used for web development, data analysis, artificial intelligence, and more.

  • Advantages of Python include its ease of use, large standard library, and community support.

  • Functions in Python are used to group related code and make it reusable.

  • The break statement is used to exit a loop prematurely.

  • A tuple is an ordered, immutable collection of elements.

Add your answer

Q161. What do you know about Google’s product and technology?

Ans.

Google is a multinational technology company that specializes in internet-related services and products.

  • Google Search

  • Google Maps

  • Google Drive

  • Google Chrome

  • Google Assistant

  • Google Cloud Platform

  • Google Analytics

  • Google AdWords

  • Google Pixel

  • Google Nest

  • Google Meet

  • Google Classroom

  • Google Translate

  • Google Earth

  • Google Play Store

  • Google Docs

  • Google Sheets

  • Google Slides

  • Google Forms

Add your answer

Q162. tell me about different types of graph..

Ans.

There are various types of graphs used in data visualization, such as bar graphs, line graphs, pie charts, scatter plots, and histograms.

  • Bar graph - used to compare different categories

  • Line graph - shows trends over time

  • Pie chart - displays parts of a whole

  • Scatter plot - shows relationship between two variables

  • Histogram - displays distribution of data

Add your answer

Q163. Is your GPA an accurate reflection of ur abilities ? Why or why not ?

Ans.

GPA is not always an accurate reflection of abilities.

  • GPA only measures academic performance, not practical skills or experience.

  • Some students may struggle with standardized testing or have personal issues that affect their grades.

  • Employers often look for well-rounded candidates with extracurricular activities and work experience.

  • However, a high GPA can demonstrate discipline, hard work, and intelligence.

  • Ultimately, GPA should be considered alongside other factors when evalua...read more

Add your answer

Q164. Return the 4th largest data, can be solved using heap data structure

Ans.

Use a heap data structure to find the 4th largest data in an array.

  • Create a max heap from the array

  • Pop the top element from the heap 3 times to get the 4th largest element

  • Return the 4th largest element

Add your answer

Q165. Any plans of continuing in marketing and what type of marketing - digital, brand etc

Ans.

Yes, I plan to continue in digital marketing as it is constantly evolving and offers a wide range of opportunities.

  • I have a strong interest in digital marketing and have been keeping up with the latest trends and technologies.

  • I believe that digital marketing offers a more targeted and measurable approach to reaching customers.

  • I have experience in social media marketing, email marketing, and search engine optimization.

  • I am also interested in exploring the use of artificial int...read more

Add your answer

Q166. If integer array used to store big integers (one integer store one digit), implement arithmetic operations

Ans.

Implement arithmetic operations on big integers stored as an array of integers.

  • Use the array to represent the digits of the big integers.

  • Implement addition, subtraction, multiplication, and division operations.

  • Handle carry-over and borrow operations appropriately.

  • Consider edge cases like leading zeros and negative numbers.

Add your answer

Q167. Given an array of numbers, replace each number with the product of all the numbers in the array except the number itself *without* using division

Ans.

Replace each number in an array with the product of all other numbers without using division.

  • Iterate through the array and calculate the product of all numbers to the left of the current index.

  • Then, iterate through the array again and calculate the product of all numbers to the right of the current index.

  • Multiply the left and right products to get the final product and replace the current index with it.

Add your answer

Q168. what is spring? and features? importance

Ans.

Spring is a popular Java framework for building web applications and microservices.

  • Spring provides a comprehensive programming and configuration model for modern Java-based enterprise applications.

  • It offers features like dependency injection, aspect-oriented programming, and transaction management.

  • Spring Boot is a popular extension of the framework that simplifies the process of creating standalone, production-grade Spring-based applications.

  • Spring is important because it hel...read more

Add your answer

Q169. Different cases used for software testing

Ans.

Different cases used for software testing include functional, performance, security, usability, and compatibility testing.

  • Functional testing ensures that the software meets the specified requirements

  • Performance testing checks the software's speed, scalability, and stability under different loads

  • Security testing identifies vulnerabilities and ensures data protection

  • Usability testing evaluates the software's user-friendliness

  • Compatibility testing checks the software's compatibi...read more

Add your answer

Q170. Write a program to find depth of binary search tree without using recursion

Ans.

Program to find depth of binary search tree without recursion

  • Use a stack to keep track of nodes and their depths

  • Iteratively traverse the tree and update the maximum depth

  • Return the maximum depth once traversal is complete

Add your answer

Q171. What are the assumptions in Linear Regressions? Where does the assumptions of Gaussian Noise come from?

Ans.

Assumptions in Linear Regression and Gaussian Noise origins

  • Assumptions in Linear Regression include linearity, independence of errors, homoscedasticity, and normality of errors.

  • Gaussian Noise assumption comes from the assumption that the errors in the model follow a Gaussian distribution.

  • The Gaussian Noise assumption allows for the use of maximum likelihood estimation in linear regression models.

  • If the errors do not follow a Gaussian distribution, alternative regression model...read more

Add your answer

Q172. what is dsa and what is advantages

Ans.

DSA stands for Data Structures and Algorithms. It is essential for efficient problem-solving in software development.

  • DSA helps in organizing and managing data effectively

  • It improves the efficiency and performance of algorithms

  • Common data structures include arrays, linked lists, trees, graphs

  • Common algorithms include sorting, searching, and dynamic programming

Add your answer

Q173. why is google better than facebook?

Ans.

Google is better than Facebook due to its focus on search and information retrieval.

  • Google's primary focus is on search and information retrieval, while Facebook is more focused on social networking.

  • Google's search algorithm is more advanced and accurate compared to Facebook's search functionality.

  • Google offers a wide range of services beyond social networking, such as Google Maps, Gmail, and Google Drive.

  • Google has a larger market share and is considered the go-to search eng...read more

Add your answer

Q174. How do you prioritize tasks when you have multiple deadlines to meet?

Ans.

Prioritize tasks based on deadlines, importance, and impact on overall project goals.

  • Evaluate deadlines and prioritize tasks based on urgency

  • Consider the importance of each task in relation to project goals

  • Assess the impact of completing each task on overall project progress

  • Communicate with stakeholders to understand priorities and expectations

  • Break down tasks into smaller sub-tasks to manage workload effectively

Add your answer

Q175. Find the number of maximum continous 1's in an array of 1s and 0s.

Ans.

Iterate through the array and keep track of the maximum continuous 1's count.

  • Iterate through the array and keep track of the current continuous 1's count.

  • Update the maximum count whenever a 0 is encountered.

  • Return the maximum count at the end.

Add your answer

Q176. We are setting up internet access for a small town of 3000 people in India. How much bandwidth is required?

Ans.

Bandwidth requirement for a small town of 3000 people in India

  • Bandwidth requirements depend on the internet usage habits of the residents

  • Consider factors like streaming, gaming, video conferencing, and browsing

  • A good starting point could be 100 Mbps for a town of 3000 people

View 1 answer

Q177. What is the probability of breaking a stick into 3 pieces and forming a triangle

Add your answer

Q178. Remove unnecessary spaces in the given string.

Ans.

Remove unnecessary spaces in a given string.

  • Use the trim() method to remove leading and trailing spaces.

  • Use replace() method with regex to remove multiple spaces between words.

  • Example: ' Hello World ' -> 'Hello World'

Add your answer

Q179. Optimize a^b and write an appropriate program

Ans.

Optimize a^b calculation using bitwise operations

  • Use bitwise operations like left shift and AND to optimize exponentiation

  • Avoid using traditional multiplication for each iteration

  • Example: Optimized power function in C++ - int power(int a, int b) { int result = 1; while (b > 0) { if (b & 1) result *= a; a *= a; b >>= 1; } return result; }

Add your answer

Q180. Explain types of inheritances?

Ans.

Types of inheritances include single, multiple, multilevel, hierarchical, hybrid, and multipath.

  • Single inheritance: a class inherits from only one base class.

  • Multiple inheritance: a class inherits from more than one base class.

  • Multilevel inheritance: a class inherits from a class which in turn inherits from another class.

  • Hierarchical inheritance: multiple classes inherit from a single base class.

  • Hybrid inheritance: combination of multiple and multilevel inheritance.

  • Multipath ...read more

Add your answer

Q181. Write program for break program?

Ans.

A program that breaks another program into smaller parts or components.

  • Use functions or modules to break down the main program into smaller, more manageable parts

  • Consider using object-oriented programming principles to encapsulate related functionality

  • Utilize comments and documentation to explain the purpose and functionality of each part

Add your answer

Q182. How would you boost the GMail subscription base?

Ans.

To boost GMail subscription base, I would focus on improving user experience and offering incentives.

  • Improve user experience by simplifying the sign-up process and making it more user-friendly

  • Offer incentives such as free storage or premium features for new subscribers

  • Partner with other companies to offer exclusive deals to GMail subscribers

  • Launch targeted marketing campaigns to reach potential subscribers

  • Provide excellent customer support to retain existing subscribers

Add your answer

Q183. Write the code to effectively manage a hospital system.

Ans.

Code to manage hospital system efficiently.

  • Implement a database to store patient information, medical records, and appointments.

  • Develop a user interface for staff to schedule appointments, view patient records, and manage inventory.

  • Create algorithms for prioritizing patient care based on severity of condition.

  • Integrate billing system for processing payments and insurance claims.

Add your answer

Q184. How many times a day does a clock’s hands overlap?

Ans.

The clock's hands overlap 22 times a day.

  • The hands overlap once every hour, except for when they overlap at 12:00

  • The minute hand moves 12 times faster than the hour hand

  • The hands overlap at 12:00, 1:05, 2:10, 3:15, 4:20, 5:25, 6:30, 7:35, 8:40, 9:45, and 10:50

Add your answer

Q185. What are three long term challenges facing google?

Ans.

Three long term challenges facing Google are privacy concerns, competition, and diversification.

  • Privacy concerns and regulations may limit Google's ability to collect and use user data for advertising purposes.

  • Competition from other tech giants like Amazon and Facebook may threaten Google's dominance in search and advertising.

  • Diversification into new markets and industries may be necessary to maintain growth and relevance in the long term.

Add your answer

Q186. If the AdSpend of a client is x and his keywords and targeting are y and z. How would you increase reach and conversion

Add your answer

Q187. What would be the best way to sell something least valuable for company

Ans.

Focus on the benefits and create a sense of urgency.

  • Highlight the potential benefits of the product, even if it is least valuable.

  • Create a sense of urgency by offering limited time or quantity.

  • Offer additional incentives like discounts or freebies.

  • Target a specific niche market that may find value in the product.

  • Use creative marketing strategies like social media or influencer marketing.

  • Provide excellent customer service to build trust and loyalty.

  • Consider bundling the produc...read more

Add your answer

Q188. there is any network using variations?

Ans.

Yes, there are various network variations such as neural networks, deep learning networks, and convolutional networks.

  • Neural networks are a type of machine learning algorithm inspired by the human brain.

  • Deep learning networks are neural networks with multiple layers, allowing them to learn complex patterns.

  • Convolutional networks are commonly used in image recognition tasks, where they apply filters to input data to extract features.

Add your answer
Asked in
SDE Interview

Q189. given a binary tree whose every node value is a number. find the sum of all the numbers that are formed from root to leaf paths

Ans.

Sum all numbers formed from root to leaf paths in a binary tree

  • Traverse the tree from root to leaf nodes, keeping track of the current number formed

  • Add the current number to the sum when reaching a leaf node

  • Recursively explore left and right subtrees

Add your answer

Q190. What you do when your wifi is not connected with other device and you didn't get password

Ans.

Try to troubleshoot the wifi connection issue by checking settings, restarting devices, and seeking help from IT support.

  • Check if the wifi is turned on and the correct network is selected

  • Restart the wifi router and the device

  • Contact IT support for assistance in retrieving the password

View 1 answer

Q191. what is windows functions in sql

Ans.

Windows functions in SQL are built-in functions that perform calculations across a set of rows and return a single value.

  • Windows functions are used to perform calculations on a specific subset of rows in a result set.

  • They are often used with the OVER clause to define the window of rows over which the function operates.

  • Examples of windows functions include ROW_NUMBER(), RANK(), and SUM().

Add your answer

Q192. How many golf balls can fit in a school bus?

Ans.

The answer depends on the size of the golf balls and the school bus. A rough estimate would be around 500,000 golf balls.

  • The size of the golf balls and the school bus will affect the answer.

  • Calculations can be made based on the volume of the school bus and the volume of a golf ball.

  • Assuming a school bus has a volume of 72,000 cubic feet and a golf ball has a volume of 2.5 cubic inches, approximately 500,000 golf balls can fit in a school bus.

Add your answer

Q193. How would you design a simple search engine?

Ans.

A simple search engine can be designed using web crawling, indexing, and ranking algorithms.

  • Determine the scope and purpose of the search engine

  • Develop a web crawler to collect data from websites

  • Create an index of the collected data

  • Implement a ranking algorithm to display results based on relevance

  • Consider user experience and interface design

  • Continuously update and improve the search engine

Add your answer

Q194. Find the maximum rectangle (in terms of area) under a histogram in linear time

Ans.

Find the maximum rectangle (in terms of area) under a histogram in linear time

  • Use a stack to keep track of the bars in the histogram

  • For each bar, calculate the area of the rectangle it can form

  • Pop the bars from the stack until a smaller bar is encountered

  • Keep track of the maximum area seen so far

  • Return the maximum area

Add your answer

Q195. Describe recursive mergesort and its runtime. Write an iterative version in C++/Java/Python

Ans.

Recursive mergesort divides array into halves, sorts them and merges them back. O(nlogn) runtime.

  • Divide array into halves recursively

  • Sort each half recursively using mergesort

  • Merge the sorted halves back together

  • Runtime is O(nlogn)

  • Iterative version can be written using a stack or queue

Add your answer

Q196. Create a cache with fast look up that only stores the N most recently accessed items

Ans.

Create a cache with fast look up that only stores the N most recently accessed items

  • Implement a hash table with doubly linked list to store the items

  • Use a counter to keep track of the most recently accessed items

  • When the cache is full, remove the least recently accessed item

Add your answer

Q197. what is software computing ?

Ans.

Software computing is the process of using software to perform calculations, process data, and solve problems.

  • Software computing involves writing code to instruct computers to perform specific tasks.

  • It includes algorithms, data structures, and programming languages.

  • Examples include creating applications, developing websites, and analyzing data.

  • Software computing is essential for automation, data processing, and decision-making.

Add your answer

Q198. How do you split search query

Ans.

Splitting search query involves breaking it down into individual keywords or phrases for more accurate results.

  • Identify key words or phrases in the search query

  • Use delimiters like spaces or commas to separate the query into individual components

  • Consider using regular expressions for more complex splitting requirements

Add your answer

Q199. What is ur goal?

Ans.

My goal is to continuously improve my technical skills, contribute to innovative projects, and advance in my career as a software developer.

  • Continuous learning and improvement in technical skills

  • Contributing to innovative projects

  • Advancing in my career as a software developer

Add your answer

Q200. Given a tree, find top k nodes with highest value

Ans.

Use a priority queue to find top k nodes with highest value in a tree

  • Traverse the tree and store nodes in a priority queue based on their values

  • Pop k nodes from the priority queue to get the top k nodes with highest value

Add your answer
1
2
3
4
5

More about working at Google

Top Rated Large Company - 2024
Top Rated Internet/Product Company - 2024
HQ - Mountain View,California, United States
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at LUK Enterprises

based on 849 interviews
Interview experience
4.3
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

3.8
 • 2k Interview Questions
3.4
 • 791 Interview Questions
3.9
 • 725 Interview Questions
4.2
 • 370 Interview Questions
3.4
 • 174 Interview Questions
3.9
 • 157 Interview Questions
View all
Top Google Interview Questions And Answers
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 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