Wednesday, October 31, 2012

Career Mania 55: FaaDoOEngineers.com: Homeywell Technology Solutions Lab (HTSL) placement paper 2009

Career Mania 55
Career news.....www.careermania55.koolcentre.in,movies news.....www.koolcentre.in
FaaDoOEngineers.com: Homeywell Technology Solutions Lab (HTSL) placement paper 2009
Oct 31st 2012, 07:35

FaaDoOEngineers.com
India's BIGGEST Website for Engineers & Aspiring Engineers!
Homeywell Technology Solutions Lab (HTSL) placement paper 2009
Oct 31st 2012, 06:43

2009 Honeywell Placement Paper: 1. In a certain code language, i')Guda buka' means 'Clear water' ii')Pin gola' means 'Overcast sky' iii)'Pin saf buka' means 'Clear blue sky' Which word in that code language means 'Blue'? (1) Pin (2) Buka (3) Saf (4) Guda 2 . I was born on August 11. Mohan is younger to me by 11 days. This year Independence Day falls on Monday. The day on which Mohan's birthday will fall this year will be (1) Monday (2) Tuesday (3) Sunday (4) Thursday 3. The flowers in a basket become double after every minute. In one hour, the basket becomes full. After how many minutes, the basket would be half-filled? 1) 30 (2) 45 (3) 59 (4) 58 4. Which of the following will come in place of the question mark (?) in the following letter series? BXF, DVI, FTL, HRO,? 1) JPL (2) KPL (3) JOL (4) None of these 5. If '+' means '*', '-' means '/' , '/' means '+' and '*' means '-' , then what will the value of 20/ 40 – 4 * 5 +6 ? 1) 60 (2) 1.67 (3) 150 (4) 0 6. In a class, 6 students can speak gujarati, 15 can speak Hindi and 6 can speak Marathi. If two students can speak two languages and one student can speak all the three languages, then how many students are there in the class? 1) 21 (2)22 (3) 23 (4) 24 7. If 'A' runs faster than 'E' but not as fast as 'D' and 'D' runs faster than 'C' but not as fast as' 'B', then the person who runs the fastest is 1) A (2) B (3) C (4)D 8. A person is to go up a tree 60ft high. In every second, he climbs 5ft but slips 4ft. After how many seconds, will he be able to touch the top of the tree? (1) 60 (2) 59 (3) 56 (4) 58 9.enum day { saturday, sunday=3, monday, tuesday }; value of saturday,tuesday. 10. enum day { saturday, sunday=-1, monday, tuesday }; int x=monday; value of x? 11. #define ADD(X,Y) X+Y main() { - #undef ADD(X,Y) fun(); } fun() { int y=ADD(3,2); printf("%d",y); } o/p? 12. #define ADD(X,Y) X+Y main() { #undef ADD; fun(); } fun() { #if not defined(ADD) define ADD(X+Y) X*Y int y=ADD(3,2); printf("%d",y); } o/p? 13. If in a PCM system the no of bits used is increased from n to n+1,the signal-to-noise ratio improves by (a)3dB (b)6dB (c)20ndB (d)24ndB 14. Which sorting technique is most efficient in both best and worst cases. 15. Which one is correct order of sorting techniques with respect to space complexity. 16. merge sorts, Bubble sort, Heap sort b. Quick sort, Heap sort, Insertion sort? 17. If timing requirement is the main issue, which system will you prefer a. Hard real time system, b. Soft real time system, c. Mission critical syste, 18. Bankers algorithm is used for a. Deadlock Preventions b. Deadlock avoidance c. deadlock detection?.. 19. One expression was given and we was to find postfix notation for that. 20. For a given union, what is the memory space allocated for its variables.

You are receiving this email because you subscribed to this feed at blogtrottr.com. If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Career Mania 55: FaaDoOEngineers.com: Honeywell Technology Solutions Lab (HTSL) placement paper 2010

Career Mania 55
Career news.....www.careermania55.koolcentre.in,movies news.....www.koolcentre.in
FaaDoOEngineers.com: Honeywell Technology Solutions Lab (HTSL) placement paper 2010
Oct 31st 2012, 07:35

FaaDoOEngineers.com
India's BIGGEST Website for Engineers & Aspiring Engineers!
Honeywell Technology Solutions Lab (HTSL) placement paper 2010
Oct 31st 2012, 06:45

2010 Honeywell Placement Paper: 1. How many cubes have only one face painted? (1) 8 (2) 16 (3) 24 (4) 32 2. How many cubes have only two faces painted? (1) 0 (2) 16 (3) 24 (4) 32 3. How many cubes have only four faces painted? (1) 0 (2) 8 (3) 12 (4) 16 4. How many cubes have no faces painted? (1) 0 (2) 8 (3) 16 (4) 24 5. 'Win' is related to 'Competition' in the same way as 'Invention' is related to? (1) Discovery (2) Experiment (3) Trial (4) Laboratory 6. Which of the following is illegal (a)void v; (b)void *v; (c)void **v; (d)all are legal 7. #define int INTEGER/*line1*/ #define INTEGER int/*line 2*/ main() { INTEGER p=10;/*line 5*/ printf("%d",p); } o/p? (a) compiler error at line 1 (b) compiler error at line 2 (c) compiler error at line 5 (d) No error,prints 10 ans:c 8. main() { int counter=1; for(;;) { counter++; if(counter>9) break; } } in the above program (a)error b coz for should have parameters (b)error bcoz 2 semicolons in a for loop are invalid (c)no error,loop is executed once (d) no error ,loop is executed 10 times 9. main() { char str={ H , E , L , L , O , \0 } printf("%s/n",str+1); } o/p? (a)prints ELLO (b)prints HELLO (c)prints ILLO (i.e. H is incremented by 1) (d)... 10. Binary search tree is used in a) sorting b) searching c) indexing d) all the above 11. Given a tree..write the preorder traversal 12. Given an infix expression. write its postfix 13. First general purpose microprocessor a) 2002 b)4004 c)8080 d)8085 14. ____flag is not used in 8085 jump instructions 15. SNMP is used in which layer 16. Banker's algorithm is used for 17. Belady's anomaly is related to___ 18. How can u increase ports of a microprocessor? a)8255 b)8259 c)8253 d)8251 19 Which of the following maintains a constant time(best,worst,average)? a)searching b)sorting c)indexing d)none 20. In a database a table is stored not fully..it is an example of

You are receiving this email because you subscribed to this feed at blogtrottr.com. If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Career Mania 55: FaaDoOEngineers.com: Sierra Atlantic Placement paper 2011

Career Mania 55
Career news.....www.careermania55.koolcentre.in,movies news.....www.koolcentre.in
FaaDoOEngineers.com: Sierra Atlantic Placement paper 2011
Oct 31st 2012, 07:35

FaaDoOEngineers.com
India's BIGGEST Website for Engineers & Aspiring Engineers!
Sierra Atlantic Placement paper 2011
Oct 31st 2012, 06:37

2011 Sierra Atlantic Placement Paper: 1).A bird shooter was asked how many birds he had in the bag he replied that there Were all sparrows but six ,all pigeons but six,all ducks but six how many birds had he in all? Sol.)- ?There were all sparrows but six ?means that 6 birds were not all sparrows but Only pigeons and ducks . similarly,no of sparrows plus no of ducks equal to six and no of sparrows plus no of ducks equal to six this is possible when there r 3 sparrows,3 pigeons,3 ducks.i.e. 9 birds in all. 2). The avg weight of 3 men A,B,and C is 84 kgs another man D joined the group and the avg now becomes 80 .if another man E whose weight is 3 kgs more than that of D replaces A then the avg weight of B,C,D,E becomes 79 kgs.The weight of A is? a)70kgs b)72kgs c)75kgs d)80kgs Sol.)- 75kgs 3).A Student was asked to find the value of 3/8th of sum of money. The student madeA mistake by dividing the sum by 3/8and thus got an answer which exceeed the Correct answer by 55 the correct answer was? a)9 b)18 c) 24 c)64 Sol.)- 8/3x-3/8x=55X=24 4).4 Childrens A,B,C,D is divided a bag of sweets .A takes 1/3 of them ,B 2/5th of the remaining and the rest is equally shared between c&d what fraction of the sweets that C&D get? a)1/4 b)1/5 c) 1/6 d)1/17 Sol.)- A?s share =1/3, remainder=1-1/3=2/3 B?s share=2/5 of 2/3=4/15 rest =2/3-4/15=2/5 C?s share=D?s share=1/2 of 2/5=1/5. 5)12 men working 8hrs per day complete piece of work in 10 days . to complete the same work in 8days,working 15hrs a day,the no of men required is ? Sol.)- Let req no of men=x8*15*x=10*12*8x=8 6)7^7^7=--------------------------------- 7)In profit and loss question like find gain% or loss% like If the cos price of 11 articles is equal to s.p of 10 articles ,what is profit/loss percent? Sol.)- 10%profit 8)In percentages like rohit spends 40% of sal on food,20% on h.rent,10% on entertainment,10% on conveyance .saving end of month is 1500 find monthly sal? Ans :7500 ENGLISH LANGUAGE TEST: It is some what tough ,most of questions in GRE model In this : 1.Analogies-4 2.Fill the blanks with the appropriate word-6 3.Some r like Choose the most logical order of sentences ,from among the 4 givechoices,to construct para A.This was where he went wrong B.Mr.naville,on the other hand ,was slowiy And steadily gathering support among the dissenters C.Mr.sarati thought tha t all the upheaval against him was only a storm in a tea cup D.Mr.sarathi was totally taken by surprise (1).CABD (2)DABC (3)ADBC (4)BDAC Antonyms-10 5.Synonyms-5 6.Correction of the sentences 7.First and last sentence is given correct and in middle sentences r in wrong order we have to keep them in correct order. After taking this they will give technical paper TECHNICAL TEST In this it contains c,c++,and java questions . From java 4or5 questions from JSP i.e programs on them I didn?t attempted them remaining r v.easy like 1.diff betw malloc and calloc Some options given below 2.Use of vitual function 3.Use of vitual destructor 4.Use of macro ans is to replace code with other 5.Main() { int I=10,j=11; printf(?%d %d?,I++,I++); } o/p:12 11 6.Main() { const *p; printf(?%d%d?,++p,++(*p)); } 7. What is the use of constant keyword before pointer variable 8 .Some questions on local and global variables 10 1 question on scopresolution operator 11.Some questions on packages,most questions on threads

You are receiving this email because you subscribed to this feed at blogtrottr.com. If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Career Mania 55: FaaDoOEngineers.com: Microsoft placement paper 2011

Career Mania 55
Career news.....www.careermania55.koolcentre.in,movies news.....www.koolcentre.in
FaaDoOEngineers.com: Microsoft placement paper 2011
Oct 31st 2012, 07:35

FaaDoOEngineers.com
India's BIGGEST Website for Engineers & Aspiring Engineers!
Microsoft placement paper 2011
Oct 31st 2012, 06:40

2011 Microsoft Placement Paper: 1. C++ ( what is virtual function ? what happens if an error occurs in constructor or destructor. Discussion on error handling, templates, unique features of C++. What is different in C++, ( compare with unix). 2. Given a list of numbers ( fixed list) Now given any other list, how can you efficiently find out if there is any element in the second list that is an element of the first list (fixed list). 3. Given 3 lines of assembly code : find it is doing. IT was to find absolute value. 4. If you are on a boat and you throw out a suitcase, Will the level of water increase. 5. Print an integer using only putchar. Try doing it without using extra storage. 6. Write C code for (a) deleting an element from a linked list (b) traversing a linked list 7. Compute the number of ones in an unsigned integer. ANS. #define count_ones(x) \ (x=(0xaaaaaaaa&x)>>1+(0x55555555&x), \ x=(0xcccccccc&x)>>2+(0x33333333&x), \ x=(0xf0f0f0f0&x)>>4+(0x0f0f0f0f&x), \ x=(0xff00ff00&x)>>8+(0x00ff00ff&x), \ x=x>>16+(0x0000ffff&x)) 8. Compute the discrete log of an unsigned integer. ANS. #define discrete_log(h) \ (h=(h>>1)|(h>>2), \ h|=(h>>2), \ h|=(h>>4), \ h|=(h>>8), \ h|=(h>>16), \ h=(0xaaaaaaaa&h)>>1+(0x55555555&h), \ h=(0xcccccccc&h)>>2+(0x33333333&h), \ h=(0xf0f0f0f0&h)>>4+(0x0f0f0f0f&h), \ h=(0xff00ff00&h)>>8+(0x00ff00ff&h), \ h=(h>>16)+(0x0000ffff&h)) 9. Let f(k) = y where k is the y-th number in the increasing sequence of non-negative integers with the same number of ones in its binary representation as y, e.g. f(0) = 1, f(1) = 1, f(2) = 2, f(3) = 1, f(4) = 3, f(5) = 2, f(6) = 3 and so on. Given k >= 0, compute f(k). 10. A character set has 1 and 2 byte characters. One byte characters have 0 as the first bit. You just keep accumulating the characters in a buffer. Suppose at some point the user types a backspace, how can you remove the character efficiently. (Note: You cant store the last character typed because the user can type in arbitrarily many backspaces) 11. Write a function to find the depth of a binary tree. 12. Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted. 13. Assuming that locks are the only reason due to which deadlocks can occur in a system. What would be a foolproof method of avoiding deadlocks in the system. 14. Given an array t[100] which contains numbers between 1..99. Return the duplicated value. Try both O(n) and O(n-square). 15. Given an array of characters. How would you reverse it. ? How would you reverse it without using indexing in the array. 16. An array of integers of size n. Generate a random permutation of the array, given a function rand_n() that returns an integer between 1 and n, both inclusive, with equal probability. What is the expected time of your algorithm? ANS. "Expected time" should ring a bell. To compute a random permutation, use the standard algorithm of scanning array from n downto 1, swapping i-th element with a uniformly random element <= i-th. To compute a uniformly random integer between 1 and k (k < n), call rand_n() repeatedly until it returns a value in the desired range. 17. An array of pointers to (very long) strings. Find pointers to the (lexicographically) smallest and largest strings. ANS. Scan array in pairs. Remember largest-so-far and smallest-so-far. Compare the larger of the two strings in the current pair with largest-so-far to update it. And the smaller of the current pair with the smallest-so-far to update it. For a total of <= 3n/2 strcmp() calls. That's also the lower bound. 18. Write an efficient C code for 'tr' program. 'tr' has two command line arguments. They both are strings of same length. tr reads an input file, replaces each character in the first string with the corresponding character in the second string. eg. 'tr abc xyz' replaces all 'a's by 'x's, 'b's by 'y's and so on. ANS. a) have an array of length 26. put 'x' in array element corr to 'a' put 'y' in array element corr to 'b' put 'z' in array element corr to 'c' put 'd' in array element corr to 'd' put 'e' in array element corr to 'e' and so on. the code while (!eof) { c = getc(); putc(array[c - 'a']); } 19. what is disk interleaving 20. why is disk interleaving adopted

You are receiving this email because you subscribed to this feed at blogtrottr.com. If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Career Mania 55: FaaDoOEngineers.com: GATE 2012, a gateway to successssssssssss

Career Mania 55
Career news.....www.careermania55.koolcentre.in,movies news.....www.koolcentre.in
FaaDoOEngineers.com: GATE 2012, a gateway to successssssssssss
Oct 31st 2012, 07:35

FaaDoOEngineers.com
India's BIGGEST Website for Engineers & Aspiring Engineers!
GATE 2012, a gateway to successssssssssss
Oct 31st 2012, 06:02

its all in all for a mechanical engineering student, so friends start the die hard preparation for it.

You are receiving this email because you subscribed to this feed at blogtrottr.com. If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Career Mania 55: FaaDoOEngineers.com: Google placement papers 2011 - 1

Career Mania 55
Career news.....www.careermania55.koolcentre.in,movies news.....www.koolcentre.in
FaaDoOEngineers.com: Google placement papers 2011 - 1
Oct 31st 2012, 07:35

FaaDoOEngineers.com
India's BIGGEST Website for Engineers & Aspiring Engineers!
Google placement papers 2011 - 1
Oct 31st 2012, 06:35

2011 Google Placement Paper: 1. Write a haiku describing possible methods for predicting search traffic seasonality. MathWorld's search engine seemed slowed this May. Undergrads prepping for finals. Q 2. 1 1 1 2 1 1 2 1 1 1 1 1 2 2 1 What's the next line? 312211. This is the "look and say" sequence in which each term after the first describes the previous term: one 1 (11); two 1s (21); one 2 and one 1 (1211); one 1, one 2, and two 1's (111221); and so on. See the look and say sequence entry on MathWorld for a complete write-up and the algebraic form of a fascinating related quantity known as Conway's constant. 3. You are in a maze of twisty little passages, all alike. There is a dusty laptop here with a weak wireless connection. There are dull, lifeless gnomes strolling around. What dost thou do? A) Wander aimlessly, bumping into obstacles until you are eaten by a grue. B) Use the laptop as a digging device to tunnel to the next level. C) Play MPoRPG until the battery dies along with your hopes. D) Use the computer to map the nodes of the maze and discover an exit path. E) Email your resume to Google, tell the lead gnome you quit and find yourself in whole different world [sic]. In general, make a state diagram . However, this method would not work in certain pathological cases such as, say, a fractal maze. For an example of this and commentary, see Ed Pegg's column about state diagrams and mazes . 4. What's broken with Unix? Their reproductive capabilities. How would you fix it? 5. On your first day at Google, you discover that your cubicle mate wrote the textbook you used as a primary resource in your first year of graduate school. Do you: A) Fawn obsequiously and ask if you can have an autograph. B) Sit perfectly still and use only soft keystrokes to avoid disturbing her concentration C) Leave her daily offerings of granola and English toffee from the food bins. D) Quote your favorite formula from the textbook and explain how it's now your mantra. E) Show her how example 17b could have been solved with 34 fewer lines of code. 6. Which of the following expresses Google's over-arching philosophy? A) "I'm feeling lucky" B) "Don't be evil" C) "Oh, I already fixed that" D) "You should never be more than 50 feet from food" E) All of the above 7. How many different ways can you color an icosahedron with one of three colors on each face? For an asymmetric 20-sided solid, there are possible 3-colorings . For a symmetric 20-sided object, the Polya enumeration theorem can be used to obtain the number of distinct colorings. Here is a concise Mathematica implementation: What colors would you choose? 8. This space left intentionally blank. Please fill it with something that improves upon emptiness. For nearly 10,000 images of mathematical functions, see The Wolfram Functions Site visualization gallery . 9. On an infinite, two-dimensional, rectangular lattice of 1-ohm resistors, what is the resistance between two nodes that are a knight's move away? This problem is discussed in J. Cserti's 1999 arXiv preprint . It is also discussed in The Mathematica GuideBook for Symbolics, the forthcoming fourth volume in Michael Trott's GuideBook series, the first two of which were published just last week by Springer-Verlag. The contents for all four GuideBooks, including the two not yet published, are available on the DVD distributed with the first two GuideBooks. 10. It's 2PM on a sunny Sunday afternoon in the Bay Area. You're minutes from the Pacific Ocean, redwood forest hiking trails and world class cultural attractions. What do you do? 11. In your opinion, what is the most beautiful math equation ever derived? There are obviously many candidates. The following list gives ten of the authors' favorites: 1. Archimedes' recurrence formula : , , , 2. Euler formula : 3. Euler-Mascheroni constant : 4. Riemann hypothesis: and implies 5. Gaussian integral : 6. Ramanujan's prime product formula: 7. Zeta-regularized product : 8. Mandelbrot set recursion: 9. BBP formula : 10. Cauchy integral formula: 12. Which of the following is NOT an actual interest group formed by Google employees? A. Women's basketball B. Buffy fans C. Cricketeers D. Nobel winners E. Wine club 13. What will be the next great improvement in search technology? 14. What is the optimal size of a project team, above which additional members do not contribute productivity equivalent to the percentage increase in the staff size? A) 1 B) 3 C) 5 D) 11 E) 24 15. Given a triangle ABC, how would you use only a compass and straight edge to find a point P such that triangles ABP, ACP and BCP have equal perimeters? (Assume that ABC is constructed so that a solution does exist.) This is the isoperimetric point , which is at the center of the larger Soddy circle. It is related to Apollonius' problem . The three tangent circles are easy to construct: The circle around has diameter , which gives the other two circles. A summary of compass and straightedge constructions for the outer Soddy circle can be found in " Apollonius' Problem: A Study of Solutions and Their Connections" by David Gisch and Jason M. Ribando. 16. { long l=1024; int i=1; while(l>=1) { l=l/2; i=i+1; } } a)8 b)11 c)10 d)100 ans:b 17. This question is based on the complexity ... Q3) s->AB A->a B->bbA Which one is false for above grammar. 18. Some Tree were given & the question is to fine preorder traversal. 19. One c++ program,to find output of the program.. 20. If the mean failure hour is 10,000 and 20 is the mean repair hour. If the printer is used by 100 customer, then find the availability. 1)80% 2)90% 3)98% 4)99.8% 5)100%

You are receiving this email because you subscribed to this feed at blogtrottr.com. If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Career Mania 55: FaaDoOEngineers.com: Microsoft placement paper 2010

Career Mania 55
Career news.....www.careermania55.koolcentre.in,movies news.....www.koolcentre.in
FaaDoOEngineers.com: Microsoft placement paper 2010
Oct 31st 2012, 07:35

FaaDoOEngineers.com
India's BIGGEST Website for Engineers & Aspiring Engineers!
Microsoft placement paper 2010
Oct 31st 2012, 06:39

2010 Microsoft Placement Paper: 1. A version of the "There are three persons X Y Z, one of which always lies".. etc.. 2. There are 3 ants at 3 corners of a triangle, they randomly start moving towards another corner.. what is the probability that they don't collide. 3. Write an efficient algorithm and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage. 4. The if (x == 0) y = 0 etc.. 5. Some more bit wise optimization at assembly level 6. C++ ( what is virtual function ? what happens if an error occurs in constructor or destructor. Discussion on error handling, templates, unique features of C++. What is different in C++, ( compare with unix). 7. Given a list of numbers ( fixed list) Now given any other list, how can you efficiently find out if there is any element in the second list that is an element of the first list (fixed list). 8. Given 3 lines of assembly code : find it is doing. IT was to find absolute value. 9. If you are on a boat and you throw out a suitcase, Will the level of water increase. 10. Print an integer using only putchar. Try doing it without using extra storage. 11. Let f(k) = y where k is the y-th number in the increasing sequence of non-negative integers with the same number of ones in its binary representation as y, e.g. f(0) = 1, f(1) = 1, f(2) = 2, f(3) = 1, f(4) = 3, f(5) = 2, f(6) = 3 and so on. Given k >= 0, compute f(k). 12. A character set has 1 and 2 byte characters. One byte characters have 0 as the first bit. You just keep accumulating the characters in a buffer. Suppose at some point the user types a backspace, how can you remove the character efficiently. (Note: You cant store the last character typed because the user can type in arbitrarily many backspaces) 13. What is the simples way to check if the sum of two unsigned integers has resulted in an overflow. 14. How do you represent an n-ary tree? Write a program to print the nodes of such a tree in breadth first order. 15. Give a very good method to count the number of ones in a "n" (e.g. 32) bit number. ANS. Given below are simple solutions, find a solution that does it in log (n) steps. Iterative function iterativecount (unsigned int n) begin int count=0; while (n) begin count += n & 0x1 ; n >>= 1; end return count; end Sparse Count function sparsecount (unsigned int n) begin int count=0; while (n) begin count++; n &= (n-1); end return count ; end 16. Given a rectangular (cuboidal for the puritans) cake with a rectangular piece removed (any size or orientation), how would you cut the remainder of the cake into two equal halves with one straight cut of a knife ? 17. You're given an array containing both positive and negative integers and required to find the sub-array with the largest sum (O(N) a la KBL). Write a routine in C for the above. 18. Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like. [ I ended up giving about 4 or 5 different solutions for this, each supposedly better than the others ]. 19. Write code for reversing a linked list. 20. Write, efficient code for extracting unique elements from a sorted list of array. e.g. (1, 1, 3, 3, 3, 5, 5, 5, 9, 9, 9, 9) -> (1, 3, 5, 9).

You are receiving this email because you subscribed to this feed at blogtrottr.com. If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions