Related Articles
InfoEdge Interview Experience | Set 2 (For PHP-MySQL Developer Profile)
• Difficulty Level : Medium
• Last Updated : 24 Jun, 2015

Recently I got interviewed at infoedge for PHP-MYSQL (LAMP) developer profile their naukri .com site.

Round 1
It was a written round:
7 ques, 20 marks in total, 40 mins
Q1. Write a program to find intersection of 2 strings with non-repeating characters.
Q2. Mention the differences between primary key and unique key.
Q3. Write a function which intakes an integer array. Swap the max element and the second
Lowest element of the array keeping the position of rest of the elements as previous i.e unchanged.
Q4. Puzzle: 9 balls with 1 heavier ball in them and a 2 pan balance is provided, find the minimum number of attempts required to find the heavier ball.
Ans: 2 (According to me)
Q5: How many print statements for f(4,a,b,c) :

```    f(n,a,b,c)
{
if (n==0)
{
printf(“\n a=%d b= %d c= %d”,a,b,c);
}
else
{
F(n-1,c,a,b);
printf(“\n a=%d b= %d c= %d”,a,b,c);
F(n-1,b,c,a);
}
} ```

Ans: 31 (According to me)

Q6. Find Value of f(3,2)

```
f(int m,int n)
{
int  val = 1;
if (n%2==1)
val = val*m;
else if (n/2 ==1)
val = val*f(m*m,n/2);
return val;
}```

Ans: 9 (According to me)

Q7. Write Sql queries to do following task:
a) Find all teachers who have courses other than math.
b) Find all student names who have atleast one subject taken by a lady teacher

Tables such as COURSE, TEACHER, STUDENT etc were given.

Round 2
Interview with VP-Tech
After introducing himself as Abhishek he began his chain of questions which encompassed
OOPS, RDBMS, DS, ALGO
Q1. Can constructors be private. If yes then how to get an instance of such a class
Basically a question about singleton class
Q2. Write a query to fetch all the people with their birthdays today from a table which is as follows:
NAME | DAY OF BIRTH (INT) |MONTH OF BIRTH (INT)|YEAR OF BIRTH

Ans: Select Name from table T where( DAY_OF_BIRTH=today AND MONTH_OF_BIRTH=this_month)
Q3. What is indexing. How you will index the above table data.
Q4. Remove extra parenthesis to form the correct equation, write full working code .
Note: Redundant parenthesis are not to be removed only extra ones are to be removed

```e.g.    input :	(((((a+b)*c))+((d+e)))))*f))))))))))
output: (((((a+b)*c))+((d+e)))))*f ```

Ans . Javacode: done in O(n)

 `package` `remove_extra_parenthesis;``import` `java.util.*;`` ` `class` `stackelement``{``    ``char` `element;``    ``int` `index;``    ``stackelement()``    ``{``        ``element = ``'a'``;``        ``index = ``0``;``    ``}``    ``stackelement(``char` `cc, ``int` `in)``    ``{``        ``element = cc;``        ``index = in;``    ``}``}`` ` `public` `class` `removal``{``    ``public` `static` `void` `main(String[] args)``    ``{``        ``// TODO Auto-generated method stub``        ``Scanner sc=``new` `Scanner(System.in);``        ``stackelement se = ``new` `stackelement();``        ``stackelement check = ``new` `stackelement();``        ``System.out.println(``"Please enter elements..."``);``        ``String s= sc.nextLine();``        ``char` `a[]= ``new` `char``[s.length()];``        ``Stack st = ``new` `Stack();``        ``for``(``int` `i=``0``; i

Some other variants of this question which I found online:
http://stackoverflow.com/questions/13204483/remove-extra-parenthesis
http://www.careercup.com/question?id=12011927

Q5. Write full working code for pattern

```                                    	1
1   	2       1
1  	2       3    	2 	1
1 	2       3    	4   	3      2	1
1	2        3   	2  	1
1     	2    	1
1```

After this round they told me to leave for the day and for next rounds we will let me know you, if I am through this round at a later date.

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

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.  To complete your preparation from learning a language to DS Algo and many more,  please refer Complete Interview Preparation Course.   In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.

My Personal Notes arrow_drop_up
{"ft_lang_label":"__label__en","ft_lang_prob":0.7336593,"math_prob":0.80270123,"size":4731,"snap":"2021-04-2021-17","text_gpt3_token_len":1380,"char_repetition_ratio":0.10429448,"word_repetition_ratio":0.061923582,"special_character_ratio":0.30395266,"punctuation_ratio":0.19664492,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9653734,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-04-21T15:14:13Z\",\"WARC-Record-ID\":\"<urn:uuid:419b0bed-84cd-4fc2-85e9-451d3e20eebc>\",\"Content-Length\":\"103108\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:b3c3cf09-49cc-43d7-812c-0d205299e144>\",\"WARC-Concurrent-To\":\"<urn:uuid:1c6b1cb6-07a3-4f96-9f53-17bca30ef5db>\",\"WARC-IP-Address\":\"23.221.227.248\",\"WARC-Target-URI\":\"https://www.geeksforgeeks.org/infoedge-interview-experience-set-2-for-php-mysql-developer-profile/\",\"WARC-Payload-Digest\":\"sha1:UL35FQTIIMZVX6652KQ3Z5OAEUNXUTXM\",\"WARC-Block-Digest\":\"sha1:MVRTABRNMD2UMUDH5BZ7JQYOUXZQE6YA\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-17/CC-MAIN-2021-17_segments_1618039544239.84_warc_CC-MAIN-20210421130234-20210421160234-00019.warc.gz\"}"}