0% found this document useful (0 votes)
13 views2 pages

Gofrugal

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views2 pages

Gofrugal

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

GOFRUGAL TECHNICAL INTERVIEW QUESTIONS

1) Rotate matrix: Given an image represented by a N*N matrix, where each pixel in the
image is 4 bytes, write a method to rotate the image 90 degrees. Can you do this in
place?

2) Implement a function to check if a linked list is palindrome or not.

3) Write an algorithm to print all ways of arranging eight queens on an 8*8 chess board so
that none of them share the same row, column, or diagonal. In this case, “diagonal”,
means all diagonals, not just the two that bisect the board.

4) What is the significance of the key “volatile” in C?

5) How can you sort the elements of the array in descending order

6) Print n space separated integers such that odd numbers will come after the even
numbers in the list.

7) Write a C program to convert a decimal number to binary and print the count of 1's in
it. If 1's are not present in binary number, then print invalid input.

8) Print Prime number series for the given integer.

9) A string contains multiple characters which are repeated consecutively. Write a


program that reduces the size of the string using given mathematical logic.

Sample Test Case:


Input:
aaabbbcccddeeeffggg
Output:
a3b3c3d2e3f2g3

10) Write a function FindMaxInArray, which finds the largest number in an array with its
index.
The largest number and its index should be printed in separate lines.
Sample Test Cases :
INPUT:
35 42 67 57 11 12 45 94 55 87
OUTPUT:
94
7

11) Program to check whether the number is Prime or Not

You might also like