tag:blogger.com,1999:blog-8712770457197348465.post5365394614279894728..comments2014-04-20T09:36:42.726-07:00Comments on Javarevisited: Top 30 Programming questions asked in Interview - Java C C++ AnswersJavin Paulhttps://plus.google.com/114528699166048052030noreply@blogger.comBlogger41125tag:blogger.com,1999:blog-8712770457197348465.post-85982888719182486842014-03-21T01:43:14.115-07:002014-03-21T01:43:14.115-07:00why don't you put list of complex programming ...why don't you put list of complex programming questions for interviewAlen Jainhttp://www.blogger.com/profile/15211567207099447748noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-37284958023957663122014-03-03T14:43:00.418-08:002014-03-03T14:43:00.418-08:00Here's one I got:
Given a chessboard one Knig...Here's one I got:<br /><br />Given a chessboard one Knight, determine whether there is a path through the chessboard, starting on any square, which would result in the Knight visiting every square on the board.<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-72599745672639109162014-02-18T23:34:48.058-08:002014-02-18T23:34:48.058-08:00can you add some programming interview questions o...can you add some programming interview questions on multithreading concept?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-69435932318883583352014-02-18T23:33:21.493-08:002014-02-18T23:33:21.493-08:00can you give me the code for
Q)Biggest polidrome i...can you give me the code for<br />Q)Biggest polidrome in a given string?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-1677847712008688172014-02-18T04:18:02.790-08:002014-02-18T04:18:02.790-08:00For computing fibonacci sequence numbers, you can ...For computing fibonacci sequence numbers, you can even manage a O(log(n)) complexity (in time), same for question number 25 (mistakenly written as 35 by the way).Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-83142583546265011302014-01-01T09:24:40.281-08:002014-01-01T09:24:40.281-08:00plz give solution using java programmin to find or...plz give solution using java programmin to find or count super palindrome in a string eg.nanded ,,,ie nan is <br />palindrom and ded is another palindrome ..plz mail soln to koolkbh@rediffmail.vomAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-87083475986686346032013-12-01T01:55:24.064-08:002013-12-01T01:55:24.064-08:008)Given two arrays, 1,2,3,4,5 and 2,3,1,0,5 find w...8)Given two arrays, 1,2,3,4,5 and 2,3,1,0,5 find which number is not present in the second array.<br />Because {1,2,3,4,5} is sorted array you can use binary search in it while walk through {2,3,1,0,5}. It is fastest, isn't it?Stanislav Lorentshttp://www.blogger.com/profile/14371581858849848974noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-2308320009380885022013-11-30T23:53:56.105-08:002013-11-30T23:53:56.105-08:005) In an array 1-100 numbers are stored, one numbe...5) In an array 1-100 numbers are stored, one number is missing how do you find it?<br />First decision sort and walk. Fast algorithm formula: result = sum(1..100) - sum(of array numbers). <br />35) You need to write a function to climb n steps you can climb either 1 step at a time or 2 steps a time, write a function to return number of ways to climb a ladder with n step. <br />Enjoy C/C++ http://Stanislav Lorentshttp://www.blogger.com/profile/14371581858849848974noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-70064796644138172882013-11-22T06:22:05.711-08:002013-11-22T06:22:05.711-08:00When trying to solve the question asking "Giv...When trying to solve the question asking "Given two arrays, 1,2,3,4,5 and 2,3,1,0,5 find which number is not present in the second array" I see a lot of O(n^2) responses (double loops). I think knowing the API gives a good developer a 'leg up':<br /><br /> Integer[] a = new Integer[]{1,2,3,4,5};<br /> Integer[] b = new Integer[]{2,3,1,0,5};<br /> Set setA = new HashSet<&Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-71916695546543910872013-08-19T00:21:37.023-07:002013-08-19T00:21:37.023-07:00Hello Javin, would you mind to share some Programm...Hello Javin, would you mind to share some Programming Interview questions from Microsoft, Google, Amazon, Twitter and Facebook. I have those companies on my radar and preparing for their job interviews. Since you share some genuine, real questions, I would be glad if you can get something from your network for Microsoft, Amazon and Google. I am specially interested on coding, logic and Gurpeetnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-62172939031439137752013-08-04T22:38:00.382-07:002013-08-04T22:38:00.382-07:00Write the code you can get it on the greatest comm...Write the code you can get it on the greatest common factor.please any one answer this question Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-45229101168898618802013-08-03T04:27:42.833-07:002013-08-03T04:27:42.833-07:00great stuff,, but it would be much better if the a...great stuff,, but it would be much better if the answer were given here.<br />CAN ANYONE SEND ME SOLUTION OF ABOVE GIVEN QUESTION PLEASE,,,, rajnikantmrc@gmail.comAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-79607316042176548642013-05-08T08:43:21.896-07:002013-05-08T08:43:21.896-07:008)Given two arrays, 1,2,3,4,5 and 2,3,1,0,5 find w...8)Given two arrays, 1,2,3,4,5 and 2,3,1,0,5 find which number is not present in the second array.<br /><br />int[] a = { 1, 2, 3, 4, 5, 8 };<br />int[] b = { 2, 3, 1, 0, 5 };<br /><br /> boolean isPresent = false;<br /> for (int i = 0; i < a.length; i++) {<br /> for (int j = 0; j < b.length; j++) {<br /> if (a[i] == b[j]) {<br /> isPresent = true;<br /> }<br /> }<br /> if Sandip Dabhadehttp://www.blogger.com/profile/03212444505612638567noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-48162911216320147432013-01-01T13:24:17.614-08:002013-01-01T13:24:17.614-08:00Most of them are too easy. ...really...just in cla...Most of them are too easy. ...really...just in class 11 but i no most of these...some of them have also been in question paper.sohailhttp://www.blogger.com/profile/05553264458339887584noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-48222789964785601662012-12-29T21:39:02.043-08:002012-12-29T21:39:02.043-08:008)Given two arrays, 1,2,3,4,5 and 2,3,1,0,5 find w...8)Given two arrays, 1,2,3,4,5 and 2,3,1,0,5 find which number is not present in the second array.<br /><br />1. Sort two arrays independently ( O(n*log(n) time).<br />2. Marching two sorted array to find those duplicate numbers. Jacques LIAOhttp://www.blogger.com/profile/06803811431102783468noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-15364855722860080392012-10-26T12:25:37.874-07:002012-10-26T12:25:37.874-07:00Hi Javin,
For question 3, I was able to write a p...Hi Javin,<br /><br />For question 3, I was able to write a program that can do it using recursion, its here http://www.journaldev.com/526/java-program-to-find-all-permutations-of-a-string <br /><br />But I was not able to write a program using iteration, do you have a solution for that?<br /><br />For question 4, I wrote a program that you might want to check at http://www.journaldev.com/530/Pankaj Kumarhttp://www.blogger.com/profile/05601085691545168477noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-2466084224306590332012-10-14T17:33:28.645-07:002012-10-14T17:33:28.645-07:00> 2) Write a method which will remove any given...> 2) Write a method which will remove any given character from a String?<br />> 3) Print all permutation of String both iterative and Recursive way?<br />> 4) Write a function to find out longest palindrome in a given string?<br /><br />Why the questions marks? Those aren't questions.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-6469450210167720442012-10-10T11:47:38.255-07:002012-10-10T11:47:38.255-07:008)Given two arrays, 1,2,3,4,5 and 2,3,1,0,5 find w...8)Given two arrays, 1,2,3,4,5 and 2,3,1,0,5 find which number is not present in the second array.<br /><br />if Interviewer requests not to use java structure such as HashSet or Hashtable , I have another solution using pure array operation<br /> * use native array way: find max element in second[] and first[], defined an array third[max]<br /> * iterate second[] , use the element as index of Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-68891558030807606082012-10-10T11:13:39.759-07:002012-10-10T11:13:39.759-07:00Here is solution for 5) which use simple arrays op...Here is solution for 5) which use simple arrays operation and never use collection like HashSet <br />5) In an array 1-100 numbers are stored, one number is missing how do you find it?<br />totalnumber = 100, a is that array,complexity O(n)<br />use HashSet O(n x log n)<br /><br />public static void findMissedValue(int a[],int totalnumber) {<br /> int b[]=new int[totalnumber];<br /> <br /> for(Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-51372158660703241272012-09-27T08:24:17.592-07:002012-09-27T08:24:17.592-07:00In reply to Tim!
Dear you might be a good programm...In reply to Tim!<br />Dear you might be a good programmer but, in my opinion, every programmer can solve these problems if there is no time limitation. Actual thing is to solve any given problem within time and in the tense environment of an interview.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-91045792766648251512012-09-27T07:53:25.191-07:002012-09-27T07:53:25.191-07:00Very very great post. About 6 out of these 30 ques...Very very great post. About 6 out of these 30 questions were asked to me in a test. But I found it very hard to make some logic and write code on a paper because I was used to do programming on computer. Can anyone tell me that whether this problem is only with me or every one finds it difficult to code on a paper.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-81273320886097309282012-08-26T08:43:55.048-07:002012-08-26T08:43:55.048-07:00I find it strange that I can solve most of these p...I find it strange that I can solve most of these problems and I'm in my first year of studying Computer Science.Timhttp://www.blogger.com/profile/09942576422807669761noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-62496961954344954872012-08-11T11:59:40.660-07:002012-08-11T11:59:40.660-07:00You can solve the missing member problem by subtra...You can solve the missing member problem by subtracting the sum of the shorter list from the longer.Michaelhttp://www.blogger.com/profile/08311892225026653896noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-30363875720817832542012-06-24T19:30:15.960-07:002012-06-24T19:30:15.960-07:00@Anonymous,Sorry I didn't get your point? Thes...@Anonymous,Sorry I didn't get your point? These programming question are for practice before appearing to interviews? Are you complaining about answers of these question? If yes than you can easily find all answers by little work. The scope of this post is to cover programming related questions. I have even covered some of these questions in details like <a href="http://Javin @ Java design pattern questionshttp://javarevisited.blogspot.sg/2012/06/20-design-pattern-and-software-design.htmlnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-31098288950566101452012-06-19T05:09:06.891-07:002012-06-19T05:09:06.891-07:00Excuse me sir...we are following ur blog to unders...Excuse me sir...we are following ur blog to understand something not getting confusion...Write in such a way that someone can remove his/her doubt rather than getting so much confusion. I think what I want to say u can understand. Thanks......Anonymousnoreply@blogger.com