tag:blogger.com,1999:blog-8712770457197348465.post5365394614279894728..comments2024-03-17T23:01:26.872-07:00Comments on Javarevisited: Top 30 Programming questions asked in Interview - Java C C++ Answersjavin paulhttp://www.blogger.com/profile/15028902221295732276noreply@blogger.comBlogger64125tag:blogger.com,1999:blog-8712770457197348465.post-49281679420789036342021-09-18T00:36:40.298-07:002021-09-18T00:36:40.298-07:00Q4 : Food Delivery Booking
A food delivery company...Q4 : Food Delivery Booking<br />A food delivery company has 'n' number of delivery executives. For simplicity take the<br />count as 5 but the program should work for any number of delivery executives (Let their names<br />be identified as DE1, DE2....DE-n)<br />There are only 5 restaurants in the city for pick-up and 5 drop locations (Each location can have<br />multiple customers). Anonymoushttps://www.blogger.com/profile/05194600652340163359noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-26320325665755408312020-01-17T10:12:24.230-08:002020-01-17T10:12:24.230-08:00I was ask to write a random function of your own (...I was ask to write a random function of your own (a function which would take min and max value and give an output as a random number)(no library are allowed)Muhammad Maazhttps://www.blogger.com/profile/12596452240195668838noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-72093618862966969732019-01-02T03:11:47.372-08:002019-01-02T03:11:47.372-08:00For Question number 12 in array section :
public...For Question number 12 in array section : <br /><br />public static void main(String[] args) {<br /> Integer[] arrayOne = {1,2,3,4,5};<br /> Integer[] arrayTwo = {2,3,1,0,5};<br /> <br /> <br /> List listOne = new ArrayList(Arrays.asList(arrayOne));<br /> List listTwo = new ArrayList(Arrays.asList(arrayTwo));<br /> <br /> listOne.removeAll(listTwo);<br /> for (Integer integer : listTwo) Anonymoushttps://www.blogger.com/profile/06871741811473571036noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-81707197427584223042018-03-16T12:34:28.868-07:002018-03-16T12:34:28.868-07:00I think its more important for a candidate to know...I think its more important for a candidate to know how to design an application correctly rather than to solve a math problem. In real world you almost never interact with these things. Think about what real problems are out their, legacy code, bad design, bugs. How would you tackle those, these these skills not math exercises like above. They are not solved by the above, but by quality design Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-51228424593732148112017-10-31T11:37:36.875-07:002017-10-31T11:37:36.875-07:004.Write a function to find out longest palindrome ...4.Write a function to find out longest palindrome in a given string<br /><br />class Launch<br />{<br /> public static void main(String[] args) {<br /> <br /> String str = "forgeeksskeegfor";<br /> System.out.println("Length is: " + <br /> longestPalindrome(str));<br /> } <br /> public static String Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-21460876885832200312017-06-04T14:31:15.097-07:002017-06-04T14:31:15.097-07:00Just amazing. It covers almost all the major quest...Just amazing. It covers almost all the major questions.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-44072297565353122842017-04-02T11:19:51.317-07:002017-04-02T11:19:51.317-07:00Thanks for sharing this list of interview question...Thanks for sharing this list of interview questions. Anonymoushttps://www.blogger.com/profile/05561213015415451742noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-48822620258114064362016-10-31T15:20:25.710-07:002016-10-31T15:20:25.710-07:00solution of;
1234321
12321
121
1
for(int a=4;a&g...solution of;<br />1234321<br />12321<br />121 <br />1<br /><br />for(int a=4;a>=1;a--)<br /> {<br /> int v=1;<br /> Console.WriteLine();<br /> while(v<=a)<br /> {<br /> Console.Write(v);<br /> v++;<br /> }<br /><br /> v=v-2;<br /> while (vAnonymoushttps://www.blogger.com/profile/17844507542058690600noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-21392100715976788932016-09-08T01:26:11.715-07:002016-09-08T01:26:11.715-07:00matrix program accept matrix size by user
matrix s...matrix program accept matrix size by user<br />matrix size 3<br />output<br />1 5 7<br />4 2 9 <br />6 8 3<br /><br /><br />Anonymoushttps://www.blogger.com/profile/04507112499308632808noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-76157279599964660462016-09-02T04:02:14.104-07:002016-09-02T04:02:14.104-07:00Int[] input={121,122,123,124,126,127};
Output: 123...Int[] input={121,122,123,124,126,127};<br />Output: 123,124,125,126,127<br />Removing repeated number 121 and 122.<br />Since 121 has two 1's llly 122 has two 2's. Any one suggest me10 Simple way anyone can impress a girlhttps://www.blogger.com/profile/02926121529005312246noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-80601950054039483262016-08-31T08:11:56.886-07:002016-08-31T08:11:56.886-07:00How to print this patter:-
A
BC
CDE
DEFGHow to print this patter:-<br />A<br />BC<br />CDE<br />DEFGAnonymoushttps://www.blogger.com/profile/01074019075090168607noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-40428149965853978552016-06-22T01:52:38.053-07:002016-06-22T01:52:38.053-07:00//Two circles are given (center and radius for eac...//Two circles are given (center and radius for each). One circle is bigger than the other. write a program to find out the smaller circle is completely inside the bigger one. if the smaller circle is inside the bigger one, print yes, otherwise print No<br />///<br />//<br /><br />#include "stdafx.h"<br />#include<br />#include<br />int main()<br />{<br /> using namespace std;<br /> int likhin nelliyotanoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-87586490305062734112016-05-01T04:07:45.147-07:002016-05-01T04:07:45.147-07:00InterView Programming Problems topic wise
http://w...InterView Programming Problems topic wise<br />http://www.binarycoder.org/484-2/Anonymoushttps://www.blogger.com/profile/16703035481277590754noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-79144216581381310402016-03-21T05:56:16.242-07:002016-03-21T05:56:16.242-07:00Hi,
The following two questions were asked for so...Hi,<br /><br />The following two questions were asked for some of our students for a programming test:<br /><br />1. Write a program to calculate the angle between the hour hand and the minute hand of a clock if the time is given in a string format. For example if the time is given as 12:15 the output should be 90degrees.<br />2. Write a program to evaluate a mathematical expression given in lucynoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-30992238291647975812016-03-18T03:37:10.674-07:002016-03-18T03:37:10.674-07:001) ( In java or unix ) Split the input file based ...1) ( In java or unix ) Split the input file based on number of columns, each output file should have only column. can anybody able to solve this.CHANDRAYAAN 2 LANDING LIVEhttps://www.blogger.com/profile/13560247783538248865noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-34645294708049012112015-09-20T14:24:27.868-07:002015-09-20T14:24:27.868-07:00//In an array 1-100 numbers are stored, one number...//In an array 1-100 numbers are stored, one number is missing how do you find it?<br />$a=array(1,2,3,4,5,6,7,9,10);<br /><br />for($x=0;$x<8;$x++)<br />{<br /> $c1=$a[$x];<br /> $c2=$a[$x+1];<br /> if($c2==$c1+1)<br /> {<br /> $c1=$c1+1;<br /> $c2=$c2+1;<br /> <br /> }<br /> else<br /> {<br /> echo $c1+1;<br /> die();<br /> }<br /> <br />}<br /><br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-35942309963823110842015-07-06T04:34:03.062-07:002015-07-06T04:34:03.062-07:00can you help me for writing this program
1234321
...can you help me for writing this program<br /> 1234321<br /> 12321<br /> 121 <br /> 1Anonymoushttps://www.blogger.com/profile/03712452027873175344noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-56780642099520289602014-12-10T07:40:50.821-08:002014-12-10T07:40:50.821-08:00For a better solution for question 8, assuming it&...For a better solution for question 8, assuming it's consecutive numbers up to N, return N*(N+1)/2 - sumOfMissingNoArray.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-48656313969966988902014-11-03T05:22:39.598-08:002014-11-03T05:22:39.598-08:00Great collection and thank you for sharing, I must...Great collection and thank you for sharing, I must admit few of these I never encountered.<br />But I must say that I disagree with your statement:<br />"it’s expected that you are familiar with fundamental of programming and can solve problems without taking help of API"<br />With first part I agree, but the second part... doesn't that just sound strange to you?<br />I read it likeAnonymoushttps://www.blogger.com/profile/06671224876432667555noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-53576878112525619762014-08-19T19:10:51.169-07:002014-08-19T19:10:51.169-07:00@Stanislav Lorents: your solution for the step cou...@Stanislav Lorents: your solution for the step count is wrong. For one step, there's one way (s(1) = 1). For two steps, two ways (s(2) = 2). From the third step, you can choose to go to step 1 or 2. The number of ways is s(1) + s(2). For four steps, you can go to step 3 or 2 (s(3) + s(2) ways). It's Fibonacci again.Scotthttps://www.blogger.com/profile/05511964464437000519noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-3571805442702052082014-08-11T21:17:33.204-07:002014-08-11T21:17:33.204-07:00@Ramesh Kumar
String newString = "";
Str...@Ramesh Kumar<br />String newString = "";<br />String a = "My name is X Y Z";<br /> int n = a.length();<br /> int k = n-1;<br /> int j=0;<br /><br /> for (int i=n-1; i>=0; i--)<br /> {<br /> if (a.charAt(i) == ' ' || i==0)<br /> {<br /><br /> j= (i!=0)?i+1:i;<br /><br /> while(j<=k)<br /> {<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-44489441816364964852014-06-23T10:37:03.740-07:002014-06-23T10:37:03.740-07:00Can any one help me in doing this Program:
Design ...Can any one help me in doing this Program:<br />Design a Java Program to generate a bill for a customer after his order had been taken in any of the Pizza hut outletsAnkita Panditnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-69330799221626870662014-05-30T05:31:06.950-07:002014-05-30T05:31:06.950-07:00How to convert String s=" Hi Hello World"...How to convert String s=" Hi Hello World" into "world hello hi" can you please tell me<br />Anonymoushttps://www.blogger.com/profile/01390467032024724628noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-86432064211646239192014-05-16T13:47:10.391-07:002014-05-16T13:47:10.391-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 />I had just completed intro to java and I don't know anything about hashtables, so I simply created a nested for loop with an IF statement inside to compare every number 1 by 1. This will output a number from the first array that didn't match with the second array. Due to the natureAnonymoushttps://www.blogger.com/profile/15040244823630502242noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-74076227352943237302014-04-24T22:17:36.541-07:002014-04-24T22:17:36.541-07:00Coding on a whiteboard, without a computer, withou...Coding on a whiteboard, without a computer, without tools to debug or observer your working code, without a search engine, observed and critiqued is really unnatural. What's the point again? To see how good someone is at programming?Anonymoushttps://www.blogger.com/profile/12400508468066168422noreply@blogger.com