Zoho Interview Experience | Set 37 (Java Developer)

Round 1: There were 20 Aptitude Questions and 10 Java MCQ.No C or C++ questions.

Round 2: This time it was quite easy ..

1.Given a String with or without special characters find if it is Palindrome or Not.. No splitting of array must be done or No additional spaces must be used for storing the array..



Eg: RACE CAR

Eg: I DID, DID I ?

2. Given an array of integers of size n. Convert the array in such a way that if next valid number is same as current number, double its value and replace the next number with 0. After the modification, rearrange the array such that all 0’s are shifted to the end.

Input : arr[] = {2, 2, 0, 4, 0, 8}
Output : 4 4 8 0 0 0

Input : arr[] = {0, 2, 2, 2, 0, 6, 6, 0, 0, 8}
Output : 4 2 12 8 0 0 0 0 0 0

3 . TWISTED PRIME NUMBER

A number is said to be twisted prime if it is a prime number and reverse of the number is also a prime number.

Input : 97
Output : Twisted Prime Number
Explanation: 97 is a prime number
and its reverse 79 is also a prime
number.

4.Given an array A[] and a number x, check for pair in A[] with sum as x.

Eg : Input {1, 2, 4, 3, 5, 6}
SUM : 5
Output : 2 (1, 4) & (2, 3)

5.Largest Sum Contiguous Subarray
(Kadane’ Algorithm )

6.Diamond pattern : for given input size -> Here 3

  *
 ***
*****
 ***
  *


Write your Interview Experience or mail it to contribute@geeksforgeeks.org



My Personal Notes arrow_drop_up

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.