Moonfrog Labs Interview Questions

We are Moonfrog Labs, founded by experienced game developers committed to radicalize mobile gaming and bringing engaging entertainment to everyone. We have seen, bitten, lived and played hard enough to know the magical revolution a brilliant mix of product design, disruptive platforms and technology can bring about. We’re the team who has worked on Mafia Wars, CastleVille, Bubble Safari, Cafe World, Yoville, Hidden Chronicles, Empires & Allies, games loved by hundreds of millions of people.

It has got a 4.4* rating on Glassdoor and is considered one of the best product-based companies. It is highly regarded for its work-life balance.

They provide good training as well which will be beneficial in future too. You can practice the below questions collected from Moonfrog Labs Interview Experience for the interview. We have collected past frequently asked questions from Moonfrog Labs Interview Experience for your reference.

Moonfrog Labs Array Questions

Question 1. Find number of pairs in an array such that their XOR is 0 The problem “Find number of pairs in an array such that their XOR is 0” state that supposes, we have given an array of integers. The problem statement asks to find out the number of pairs present in an array, which has the pair Ai XOR Aj = 0. Note: ...

Read more

Question 2. Given an Array of Pairs Find all Symmetric Pairs in it Find all symmetric pairs – You are given some pairs of an array. You have to find out the symmetric pairs in it. The symmetric pair is said to be symmetric when in pairs say (a, b) and (c, d) in which ‘b’ is equal to ‘c’ and ‘a’ is ...

Read more

Question 3. Find subarray with given sum (Handles Negative Numbers) The problem “Find subarray with given sum (Handles Negative Numbers)” states that you are given an integer array, containing negative integers as well and a number called “sum”. The problem statement asks to print the sub-array, which sums up to a given number called “sum”.  If more than one sub-array ...

Read more

Question 4. Print modified array after multiple array range increment operations The problem “Print modified array after multiple array range increment operations” states that you are given an integer array and ‘q’ numbers of queries are given. One integer value “d” is also given. Each query contains two integers, starting value and an ending value. The problem statement asks to find ...

Read more

Question 5. Range sum queries without updates Problem Statement The problem “Range sum queries without updates” states that you have an array of integers and a range. The problem statement asks to find out the sum of all the elements within the given range. Example arr[]={10, 9, 8, 7, 6} Query: {(0, 4), (1, 3)} 40 24 ...

Read more

Question 6. Three way partitioning of an array around a given range Problem Statement You are given an array of integers and a range of lowValue and highValue. The problem “Three way partitioning of an array around a given range” asks to partition the array such that array will be divided into three parts. The partitions of the arrays will be: Elements ...

Read more

Question 7. Find the minimum distance between two numbers Problem Statement You have given an array and two numbers called x and y. The problem “Find the minimum distance between two numbers” asks to find out the minimum possible distance between them. The array given can have common elements. You can assume that both x and y are different. ...

Read more

Question 8. Count quadruples from four sorted arrays whose sum is equal to a given value x Problem Statement Problem “Count quadruples from four sorted arrays whose sum is equal to a given value x” state that you are given four integer arrays and a value called x. The problem statement asks to find out how many quadruplets can be formed of which sum of elements of ...

Read more

Question 9. Find the subarray with least average Problem Statement You have given an integer array and a number k. The problem statement asks to find the subarray with least average, which is to find out the sub-array of k elements, which has the minimum average. Example arr[] = {12, 34, 20, 30, 24, 45} k = 3 Sub-Array of [0, 2] has a minimum average. Explanation: ...

Read more

Question 10. Minimum number of subsets with distinct elements Problem Statement Suppose you have an array of integers of size n. The problem statement asks to find out the minimum number of subsets with distinct elements, that is subsets that can be formed which contain all the different/distinct elements from the array. Example arr[] = {2,4,6,2,1,4,2} 3 Explanation: {1, ...

Read more

Question 11. Cumulative Frequency of Count of Each Element in an Unsorted Array We are given an unsorted array. The task is to calculate the cumulative frequency of count of each element in an unsorted array. Example Input: A[]={2,4,3,2,2,3,4} Output: Cumulative frequency of 2 in the array is: 3 Cumulative frequency of 3 in the array is: 5 Cumulative frequency of 4 in ...

Read more

Question 12. Count Pairs Whose Products Exist in Array In count pairs whose products exist in array problem we have given an array, count all the distinct pairs whose product value is present in the array. Example Input A[]={2, 5, 6, 3, 15} Output Number of distinct pairs whose product exists in the array is: 2 Pairs are: (2, ...

Read more

Moonfrog Labs String Questions

Question 13. Reverse String Without Temporary Variable Problem Statement In the “Reverse String Without Temporary Variable” problem we have given a string “s”. Write a program to reverse this string without using any extra variable or space. Input Format The first line containing the given string “s”. Output Format Print the string which is reverse of the ...

Read more

Moonfrog Labs Graph Questions

Question 14. Topological Sorting Given a directed acyclic graph, topologically sort the graph nodes. Topological Sorting Example Topological sorting of above graph is -> {1,2,3,0,5,4} Theory Topological Sorting is done for a Directed Acyclic Graph (DAG). A DAG has no cycles in it. ie, there is no such path starting from any node of ...

Read more

Moonfrog Labs Other Questions

Question 15. Count ways to reach the nth stair using step 1, 2 or 3 The problem “Count ways to reach the nth stair using step 1, 2, or 3” states that you are standing on the ground. Now you need to reach the end of the staircase. So how many ways are there to reach the end if you can jump only 1, 2, ...

Read more

Question 16. Minimum number of jumps to reach end Problem Statement Suppose you have an array of integers and each element of an array indicates each number as maximum jumps that can be taken from that point. Your task is to find out the minimum number of jumps to reach end, i.e. minimum of jumps that can be taken ...

Read more

Question 17. Swap Nodes In Pairs In swap nodes in pairs problem, we have given a linked list consisting of n nodes. Swap every node at even index with it’s a right adjacent node at odd index() considering index starting from 0. Example Input : 1->2->3->4->NULL Output : 2->1->4->3->NULL Input : 1->2->3->4->5->6->7->NULL Output : 2->1->4->3->6->5->7->NULL Iterative Method Algorithm Create a ...

Read more

Translate »