# Tag Archives: Moonfrog Labs

Given a singly linked list, write a function to swap elements pairwise. Input: 1->2->3->4->5->6->NULL  Output: 2->1->4->3->6->5->NULL Input: 1->2->3->4->5->NULL  Output: 2->1->4->3->5->NULL Input: 1->NULL  Output: 1->NULL  Forâ€¦ Read More
Given a singly linked list, write a function to swap elements pairwise. Input: 1->2->3->4->5->6->NULL  Output: 2->1->4->3->6->5->NULL Input: 1->2->3->4->5->NULL  Output: 2->1->4->3->5->NULL Input: 1->NULL  Output: 1->NULL Forâ€¦ Read More
Given a singly linked list, write a function to swap elements pairwise. Input: 1->2->3->4->5->6->NULL  Output: 2->1->4->3->6->5->NULL Input: 1->2->3->4->5->NULL  Output: 2->1->4->3->5->NULL Input: 1->NULL  Output: 1->NULL Forâ€¦ Read More
Given a singly linked list, write a function to swap elements pairwise. Input: 1->2->3->4->5->6->NULL  Output: 2->1->4->3->6->5->NULL Input: 1->2->3->4->5->NULL  Output: 2->1->4->3->5->NULL Input: 1->NULL  Output: 1->NULL  Forâ€¦ Read More
Given a singly linked list, write a function to swap elements pairwise. Input: 1->2->3->4->5->6->NULL  Output: 2->1->4->3->6->5->NULL Input: 1->2->3->4->5->NULL  Output: 2->1->4->3->5->NULL Input: 1->NULL  Output: 1->NULL Forâ€¦ Read More
Given a singly linked list, write a function to swap elements pairwise. Input: 1->2->3->4->5->6->NULL  Output: 2->1->4->3->6->5->NULL Input: 1->2->3->4->5->NULL  Output: 2->1->4->3->5->NULL Input: 1->NULL  Output: 1->NULL Forâ€¦ Read More
About Company Recruitment Process Questions Asked in Moonfrog Labs Interview Experiences Where to Apply ? About Company : Moonfrog Labs, is a mobile games basedâ€¦ Read More
Given an array of integers where each element represents the max number of steps that can be made forward from that element. Write a functionâ€¦ Read More
Given an array, the task is to reverse the array without using subtract sign â€˜-â€˜ anywhere in your code. It is not tough to reverseâ€¦ Read More
Topological sorting for Directed Acyclic Graph (DAG) is a linear ordering of vertices such that for every directed edge uv, vertex u comes before vâ€¦ Read More
1. Topological sort. 2. Reverse linked list in pairs. (1->2->3->4 to 2->1->4->3) 3. Print a binary tree in spiral order 4. Reverse an array withoutâ€¦ Read More
Q1. Given a sequence of integers, find the longest increasing subsequence. Example: arr = [1, 2, 5, 3, 7] ans : [1, 2, 5, 7]â€¦ Read More
A number is called as a Jumping Number if all adjacent digits in it differ by 1. The difference between â€˜9â€™ and â€˜0â€™ is notâ€¦ Read More
Round 1: 1> given a number, and an encoding technique like 1-> A, 2-> B…. 26->Z, How may different valid encryption can be done. Like 123â€¦ Read More