Google Coding Interview Questions
In this article, we will be discussing Google Coding Interview Questions with their solutions.
ARRAYS
Sum of Two Values
Problem Statement: You are given an array of integers and a value, the task is to determine if there exist any two integers in the array whose sum is equal to the given value.
Solution:
Move Zeros to the Left
Problem Statement: The task is to move all zeros to the left of an array and hence, maintaining its order.
Solution:
STRINGS
String Segmentation
Problem Statement:You are given a dictionary of words alongwith an input string. The task is to tell whether the input string can be completely segmented into dictionary words.
Solution:
Longest Repeating Subsequence
For this problem, you can navigate through the link given below providing you all with the problem statement alongwith its solution.
Longest Repeating Subsequence Problem
TREES
Mirror Binary Trees
Problem Statement: You are given the root node of a binary tree, the task is to swap the 'left' and 'right' children for each node.
Solution:
To check whether two Binary Trees are identical or not
Problem Statement: You are given the roots of two binary trees, the task is to determine if these given trees are identical or not.
Solution:
The various other problem asked in Google Interview are discussed below under the following links for better understanding.
Convert Binary Tree to Mirror Tree
Linked Lists
Delete Node with Given Key
Problem Statement: You are given the head of a linked list and a key. The task is to you have to delete the node that contains this given key.
Solution:
Graphs
Minimum Spanning Tree
Problem Statement: The task is to find the minimum spanning tree of a connected, undirected graph given with weighted edges.
Solution:
Happy Learning!!
Comments
Post a Comment