80+ Interview Questions and Answers
Given an array/list of length ‘N’, where the array/list represents the boards and each element of the given array/list represents the length of each board. Some ‘K’ numbers of painter...read more
You are given an integer, ‘MAXVAL’. Your task is to determine the total number of special numbers present in the range, 1 to ‘MAXVAL’.
Note:
A special number is a number, which when rotated 180 d...read more
Preeti has decided to go to the Grand Mall to buy some stuff for her father’s birthday. On reaching the place, she found a fascinating shop that has an unlimited quantity of each item they sell. T...read more
Given an array/list of integer numbers 'CHOCOLATES' of size 'N', where each value of the array/list represents the number of chocolates in the packet. There are ‘M’ number of students and the t...read more
You are given a stream of 'N' integers. For every 'i-th' integer added to the running list of integers, print the resulting median.
Print only the integer part of the median.
Input Format :
The fi...read more
You are given a string (STR) of length N.
Your task is to find the longest palindromic substring. If there is more than one palindromic substring with the maximum length, return the...read more
Ram went to a specialty candy store in Ninjaland which has 'N' candies with different costs.
The Candy shop gives a special offer to its customers. A customer can buy a ...read more
Q8. Say you have three tables WORK, USERS, MANAGERS WORK - work_id - user_id - how_much USERS - user_id - team MANAGERS - manager_id - team If I am a manager, write a select statement to retrieve the work of all us...
read moreWrite a select statement to retrieve work of all users who belong to my team.
Join USERS and WORK tables on user_id
Join MANAGERS and USERS tables on team
Filter by manager_id
You are given a positive integer 'N’. Your task is to find and return the minimum number of steps that 'N' has to take to get reduced to 1.
You can perform any one of the following 3 st...read more
You are given an array of N integers and an integer K. For each array element, you are allowed to increase or decrease it by a value k. The task is to minimize the difference between the max...read more
Given that integers are read from a data stream. Your task is to find the median of the elements read so far.
Median is the middle value in an ordered integer list. If the size of the list is ...read more
You have been given a number of stairs. Initially, you are at the 0th stair, and you need to reach the Nth stair. Each time you can either climb one step or two steps. You are...read more
You are given a pattern in the form of a string and a collection of words. Your task is to determine if the pattern string and the collection of words have the same order.
Note :
The strings are...read more
You are given 'N' rectangular buildings in a 2-dimensional city. Your task is to compute the skyline of these buildings, eliminating hidden lines return the skyline formed by these buildings ...read more
We are suffering from the Second wave of Covid-19. The Government is trying to increase its vaccination drives. Ninja wants to help the Government to plan an effective method to help increase v...read more
You are given a string ‘text’ and a string ‘pattern’, your task is to find all occurrences of pattern in the string ‘text’ and return an array of indexes of all those ...read more
You have been given a sorted (lexical order) dictionary of an alien language. Write a function that finds the order of characters in the alien language. This dictionary will be given to you in t...read more
Ninja has a robot that can move in an infinite number line. The robot starts at position 0, with speed = +1. The robot moves automatically according to the sequence of instructions “A” (Accelerate...read more
You are given a circular array consisting of N integers. You have to find the maximum sum of the absolute difference between adjacent elements with rearrangement of array element allowed i.e af...read more
You are given a binary square matrix ‘ARR’ with N rows and N columns, in which 0 represents the water and 1 represents the land.
You have to find a water cell such that its distance ...read more
Given an undirected graph of V vertices and E edges. Your task is to find all the bridges in the given undirected graph. A bridge in any graph is defined as an edge which, when removed, makes ...read more
Given a string ’S’ consisting of lower case English letters, you are supposed to return the longest palindromic substring of ‘S’.
Note that in case of more than one longest palindro...read more
Consider a directed graph of ‘N’ nodes where each node is labeled from ‘0’ to ‘N - 1’. Each edge of the graph is either ‘red’ or ‘blue’ colored. The graph may contain self-edges o...read more
You are given a list of strings, ‘DICTIONARY[]’ that represents the correct spelling of words and a query string ‘QUERY’ that may have incorrect spelling. You have to check whether the spelling of ...read more
Q25. a / b c / / d e f g Print the nodes in the following order: a, b, c, g, f, e, d, h, i, j, k, l ,m, n, o and so on. Which all data structures are used? Can we use just 1?
Multiple data structures are used to print nodes in a specific order. One data structure cannot be used alone.
The given order suggests a depth-first search traversal of a tree-like structure.
A stack can be used to keep track of the nodes to be visited.
A queue can be used to store the children of a node in the order they are visited.
An array can be used to store the nodes in the required order.
A linked list can be used to connect the nodes in the required order.
Using just one ...read more
Q26. If you had an opportunity to design the Google Suggest system, please let us know how you would approach it and how you would execute the plan in terms of settings up systems like(data stores or databases, inde...
read moreDesigning Google Suggest system
I would start by analyzing user search patterns and frequently searched keywords
Then, I would create a database of these keywords and their associated search results
I would use indexing services to quickly retrieve relevant results for each keyword
I would also implement machine learning algorithms to improve the accuracy of suggestions over time
Q27. Given n pens and n tops, each pen (and each top) having a size different than the other and each pen fitting exactly one top, find the largest pen using minimum number of comparisons. A comparison involves pick...
read moreFind largest pen using minimum comparisons with tops.
Divide pens into two groups and compare largest pen from each group with largest top.
Repeat the process with the group containing the largest pen until only one pen is left.
The remaining pen is the largest pen.
Total number of comparisons required is 2n-3.
Q28. How do you find out if a number is a power of 2? And how do you know if it is an odd number? Write code in the language of your choice
Check if a number is a power of 2 and odd.
To check if a number is a power of 2, use bitwise AND operator with the number and its predecessor. If the result is 0, it is a power of 2.
To check if a number is odd, use modulus operator with 2. If the result is 1, it is odd.
Example code in Python:
def is_power_of_two(num):
return num & (num - 1) == 0
def is_odd(num):
return num % 2 == 1
Q29. Given a source array of integers with possible duplicates and a target integer, write algorithm to find out 2 numbers in source array whose sum is equal to target integer
Algorithm to find 2 numbers in an array whose sum is equal to a target integer
Use a hash table to store the difference between target and each element in the array
Iterate through the array and check if the current element exists in the hash table
Return the pair of elements that sum up to the target integer
You have been given 'N' ropes of different lengths, we need to connect these ropes into one rope. The cost to connect two ropes is equal to sum of their lengths. We need to conn...read more
Q31. Given n dice, each of 'a' sides and a sum b, return the number of ways in which the sum b can be obtained. How can you reduce the time complexity and space complexity?
Given n dice with 'a' sides and sum b, return no. of ways to obtain b. Optimize time and space complexity.
Use dynamic programming to reduce time complexity
Create a 2D array to store the number of ways to obtain each sum for each number of dice
Use rolling arrays to optimize space complexity
Example: n=2, a=6, b=7 -> 6 ways to obtain sum 7
Example: n=3, a=4, b=8 -> 21 ways to obtain sum 8
Q32. Which is faster: finding an item in a hashtable or in a sorted list? And Why?
Hashtable is faster for finding an item than a sorted list.
Hashtable has constant time complexity O(1) for finding an item.
Sorted list has logarithmic time complexity O(log n) for finding an item.
Hashtable uses hashing to directly access the item's location.
Sorted list requires binary search to find the item's location.
Hashtable is ideal for large datasets with frequent lookups.
Sorted list is ideal for datasets that require frequent insertions and deletions.
Q33. Given 2 machines, each having 64 GB RAM, containing all integers (8 byte), sort the entire 128 GB data. You may assume a small amount of additional RAM. Extend this to sort data stored in 1000 machines
Sort 128 GB data on 2 machines with 64 GB RAM each. Extend to 1000 machines.
Use external sorting algorithm like merge sort or quick sort
Divide data into smaller chunks and sort them individually
Merge sorted chunks using additional RAM
For 1000 machines, use distributed sorting algorithms like MapReduce or Hadoop
Ensure data consistency and fault tolerance in distributed sorting
Q34. In google adwords there are about 30 million ads from 42 lanuages . What will I do review the ads and reject ads that do not comply with specific rules
Reviewing 30 million ads from 42 languages in Google AdWords and rejecting non-compliant ads requires a systematic approach.
Create a set of specific rules and guidelines for ad compliance
Use automated tools to filter out ads that violate the rules
Assign a team of reviewers to manually check the remaining ads
Ensure that the reviewers are fluent in the languages of the ads they are reviewing
Regularly update the rules and guidelines to keep up with changes in the industry
Provide...read more
Q35. How would you change the format of all the phone numbers in 1000 static html pages?
Use a script to automate the process of changing phone number format in 1000 static html pages.
Create a script using a programming language like Python or JavaScript.
Use regular expressions to identify phone numbers in the HTML pages.
Use string manipulation functions to change the format of the phone numbers.
Test the script on a small sample of HTML pages before running it on all 1000 pages.
Make sure to backup the original HTML pages before making any changes.
Q36. What are some of the most popular Data interchange formats when using APIs
JSON and XML are the most popular data interchange formats when using APIs.
JSON (JavaScript Object Notation) is a lightweight format that is easy to read and write. It is widely used in web APIs.
XML (Extensible Markup Language) is a more complex format that is also widely used in web APIs.
Other formats include CSV (Comma Separated Values), YAML (YAML Ain't Markup Language), and Protocol Buffers.
RDBMS vs Non RDBMS
Why SQL is very popular?
How do you get second largest salary
What is stored procedure?
How to align a text in a larger web page context?
OOPS Concepts
Q39. Tell about ur strength? Tell about long term goal?
My strength lies in my problem-solving skills and ability to work well in a team. My long term goal is to become a lead developer and contribute to innovative projects.
Strong problem-solving skills
Effective team player
Long term goal of becoming a lead developer
Contribute to innovative projects
Sleeping barber problem.
Disk scheduling algos
Process Scheduling algos
Turnaround time
Threads
Q41. How will improve the revenue of the cafeteria of the office.
By introducing new menu items, optimizing pricing strategy, and improving the overall dining experience.
Conduct a survey to understand the preferences of employees
Introduce healthy and affordable meal options
Offer discounts for bulk orders or loyalty programs
Partner with local vendors to source fresh ingredients
Improve the ambiance and seating arrangements
Implement online ordering and delivery services
Q42. Which data structure will be better suited chain type data.
Linked List is the best-suited data structure for chain type data.
Linked List is a dynamic data structure that can grow or shrink during runtime.
It allows efficient insertion and deletion operations.
Each node in the linked list contains a reference to the next node.
Examples of chain type data include a list of songs in a playlist or a list of tasks in a to-do list.
Q43. Name some popular APIs for each of these Social Commerce service(llike a photo service etc)
Popular APIs for Social Commerce services
Facebook Graph API for social media integration
Instagram API for photo sharing and tagging
Twitter API for real-time updates and customer engagement
Pinterest API for product discovery and sharing
Google Maps API for location-based services
PayPal API for secure payment processing
Q44. Why is Java a platform independent language?
Java is platform independent due to its bytecode and JVM implementation.
Java code is compiled into bytecode, which can run on any platform with a Java Virtual Machine (JVM)
JVM acts as an interpreter, translating bytecode into machine code specific to the underlying platform
This allows Java programs to be written once and run anywhere, without the need for recompilation
below are giving versions and there commit msg arrange them ascending order and merge all commit messages with same versions.1.0.0* Initial release—————1.0.2* feature 2xx updated—————1.0.0* In...read more
Q46. What are Static Binding and Dynamic Binding?
Static binding is resolved at compile time, while dynamic binding is resolved at runtime.
Static binding is also known as early binding, where the method call is resolved at compile time based on the type of the object.
Dynamic binding is also known as late binding, where the method call is resolved at runtime based on the actual type of the object.
Example of static binding: method overloading.
Example of dynamic binding: method overriding.
Q47. 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 ?
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
Q48. What is the lambda expression in JAVA?
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
Q49. Is the initial shortlisting conducted through an Applicant Tracking System (ATS)?
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
Q50. What type program language do you know?
I am proficient in programming languages such as Java, Python, C++, and JavaScript.
Java
Python
C++
JavaScript
Q51. For i in pythonlife: If i=='l': Break Print(I)
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'.
Q52. Given a configuration stream, parse it in your data structure. interface Tokenizer { bool hasNext(); string nextToken(); }
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
Q53. Explain Virtual Machine (JVM) architecture.
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.
Q54. For i in range (0,9): Print(i)
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.
Q55. Return the 4th largest data, can be solved using heap data structure
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
Q56. Different cases used for software testing
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
Q57. why is google better than facebook?
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
Q58. what is dsa and what is advantages
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
Q59. Remove unnecessary spaces in the given string.
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'
Q60. Optimize a^b and write an appropriate program
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; }
Q61. Explain types of inheritances?
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
Q62. Write program for break program?
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
Q63. what is windows functions in sql
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().
Q64. How do you split search query
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
Q65. What is ur goal?
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
Q66. Given a tree, find top k nodes with highest value
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
Q67. Write program for for loop?
A for loop is used to iterate over a sequence of elements for a specified number of times.
Initialize a counter variable before the loop
Set the condition for the loop to continue based on the counter variable
Update the counter variable after each iteration
Example: for(int i = 0; i < 5; i++) { // code block }
Q68. c++ is bad that java why?
C++ and Java have different strengths and weaknesses, it's not accurate to say one is 'bad' compared to the other.
C++ is closer to the hardware and allows for more low-level programming, while Java is more platform-independent and easier to learn.
C++ gives more control over memory management, but this can lead to more bugs if not handled properly.
Java has automatic garbage collection, making memory management easier for developers.
C++ is often used for system programming and ...read more
Q69. what is cpp and its use case
C++ is a programming language used for developing software applications.
C++ is a high-level programming language known for its performance and flexibility.
It is commonly used for developing system software, game engines, and applications that require high performance.
C++ supports object-oriented programming, generic programming, and low-level memory manipulation.
Examples of software developed using C++ include operating systems like Windows, game engines like Unreal Engine, a...read more
Q70. what is java and its use case
Java is a popular programming language used for developing a wide range of applications.
Java is platform-independent, meaning it can run on any device with a Java Virtual Machine (JVM)
It is used for developing web applications, mobile apps, desktop applications, and enterprise software
Java is known for its security features and scalability
Examples of Java-based applications include Android apps, online banking systems, and e-commerce websites
Q71. What is main goal?
The main goal of a Software Developer is to design, develop, and maintain software applications to meet the needs of users.
Designing software applications based on user requirements
Developing code to implement the design
Testing and debugging software to ensure functionality
Maintaining and updating software as needed
Collaborating with team members to achieve project goals
Q72. Average of each subtree on a node in N-arry tree
Calculate the average of each subtree on a node in an N-arry tree.
Traverse the tree using depth-first search (DFS)
Maintain a sum and count for each subtree while traversing
Calculate the average by dividing the sum by the count for each subtree
Q73. How long do you code daily ?
I typically code for 6-8 hours daily, with breaks in between for rest and refreshment.
I code for 6-8 hours daily to ensure productivity and progress on projects.
I take breaks in between coding sessions to rest my mind and prevent burnout.
I prioritize quality over quantity, focusing on writing clean and efficient code.
I enjoy coding and often spend extra time outside of work hours on personal projects or learning new technologies.
Q74. experinces and how you perform
I have over 5 years of experience in software development, with a strong focus on web applications and database management.
Developed web applications using HTML, CSS, JavaScript, and various frameworks like Angular and React
Proficient in database management with SQL and NoSQL databases such as MySQL and MongoDB
Experience in version control systems like Git for collaborative development
Strong problem-solving skills and ability to work in a team environment
Continuously learning...read more
Q75. Find median of stream of integer numbers
Use two heaps to keep track of the numbers and find median efficiently.
Use a max heap to store the smaller half of the numbers and a min heap to store the larger half.
Keep the size of the two heaps balanced or with a difference of at most 1.
If the total number of elements is odd, the median is the top element of the larger heap. If even, it's the average of the tops of both heaps.
Q76. Difference between MySQL and SQLite.
MySQL is a full-featured relational database management system, while SQLite is a lightweight, serverless, self-contained database engine.
MySQL is designed for larger applications with client-server architecture, while SQLite is suitable for smaller projects or embedded systems.
MySQL supports multiple users and concurrent connections, while SQLite is limited to single-user access.
MySQL has more advanced features like stored procedures, triggers, and views, while SQLite is sim...read more
Q77. Sort an array without inbuilt methods
Sorting an array of strings without using inbuilt methods
Use a sorting algorithm like bubble sort, selection sort, or insertion sort
Compare each element with the next one and swap if necessary
Repeat the process until the array is sorted
Q78. What is interfaces in java
Interfaces in Java are a way to achieve abstraction and multiple inheritance by defining a contract that classes must implement.
Interfaces in Java are similar to classes but can only contain method signatures and constants, not method implementations.
Classes can implement multiple interfaces, allowing them to inherit behavior from multiple sources.
Interfaces are used to achieve abstraction and decouple the implementation from the interface, promoting flexibility and reusabili...read more
Q79. What is the javascript
JavaScript is a programming language used for creating interactive web pages and web applications.
JavaScript is a high-level, interpreted language.
It is primarily used for client-side scripting.
JavaScript can be embedded directly into HTML pages.
It provides dynamic functionality and interactivity to websites.
Common uses include form validation, DOM manipulation, and AJAX requests.
Q80. How I will reallocate
I will reallocate resources based on project priorities and team needs.
Prioritize tasks based on project deadlines and importance
Communicate with team members to understand their workload and availability
Adjust resources as needed to ensure project success
Example: If a critical project is falling behind schedule, I may reallocate resources from less urgent projects to meet the deadline
Q81. what is linked list
A linked list is a linear data structure where elements are stored in nodes that have a reference to the next node in the sequence.
Consists of nodes connected by pointers
Does not have a fixed size like arrays
Allows for efficient insertion and deletion operations
Example: Singly linked list, Doubly linked list
Q82. multi source bfs on the array
Multi-source BFS on an array of strings involves finding the shortest path from multiple starting points to a target point.
Implement BFS algorithm to traverse the array of strings starting from multiple sources simultaneously.
Maintain a queue of nodes to visit next, and keep track of visited nodes to avoid revisiting.
Update the distance of each node from the sources as you traverse the array.
Example: Given an array of strings representing a grid, find the shortest path from m...read more
Q83. coding program and complexity
Coding programs can vary in complexity depending on the requirements and functionalities needed.
Complexity can be measured using Big O notation, which describes the worst-case scenario for time and space complexity.
Factors affecting complexity include data structures used, algorithms implemented, and the size of input data.
Examples of complex programs include machine learning algorithms, large-scale distributed systems, and real-time processing applications.
Q84. Subarray finding maximum
Find the maximum sum of a subarray within an array of strings.
Iterate through the array and keep track of the maximum sum of subarrays.
Use Kadane's algorithm to efficiently find the maximum sum subarray.
Example: ['1', '2', '-3', '4', '5', '-6'] -> Maximum sum subarray is ['4', '5'].
Q85. binary search on array
Binary search is a fast search algorithm that finds the position of a target value within a sorted array.
Ensure the array is sorted before performing binary search.
Compare the target value with the middle element of the array.
If the target value is less than the middle element, search the left half of the array. If it is greater, search the right half.
Repeat the process until the target value is found or the subarray is empty.
Q86. HASHMAP ,find the all buddy
A HashMap is a data structure that stores key-value pairs. To find all buddies in a HashMap, we need to iterate through the entries and compare values.
Iterate through the entries of the HashMap
Compare values to find buddies
Store buddies in an array of strings
Q87. Trees based on meduim problem
Trees are data structures used to store hierarchical data. They are commonly used in algorithms and problem-solving.
Trees have a root node and branches that connect to other nodes.
Common tree traversal methods include in-order, pre-order, and post-order.
Examples of tree-based problems include finding the lowest common ancestor, balancing a binary search tree, and implementing a trie data structure.
Q88. develop Snake game
Develop a classic Snake game using JavaScript and HTML5 canvas.
Use HTML5 canvas to draw the game board and snake.
Implement logic for snake movement and collision detection.
Add functionality for snake to grow when eating food.
Track score and display it on the screen.
Handle game over condition when snake collides with walls or itself.
More about working at Google
Top HR Questions asked in null
Interview Process at null
Top Software Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month