Code Snippets Interview Questions
Questions Answers Views Company eMail

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.

ABC, eBay, Goldman Sachs, Google, HUP, Microsoft, TATA,

21 45746

Write a routine to draw a circle (x ** 2 + y ** 2 = r ** 2) without making use of any floating point computations at all.

Mentor Graphics, Microsoft,

2 21366

Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal.

Fusion Systems GmbH,

6 19162

Give a one-line C expression to test whether a number is a power of 2.

Microsoft,

10 23749

Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it.

Wipro,

2 9949

Give a very good method to count the number of ones in a 32 bit number. (caution: looping through testing each bit is not a solution)

Microsoft,

7 28181

program to Reverse a linked list

Aricent, Microsoft, Ness Technologies,

12 56941

write a program to Insert in a sorted list

Microsoft,

4 13449

Program to Delete an element from a doubly linked list.

College School Exams Tests, Infosys,

4 32119

Write a function to find the depth of a binary tree.

Adobe, Amazon, EFI, Imagination Technologies,

13 85975

Write a routine that prints out a 2-D array in spiral order

Microsoft,

3 16499

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).

Intel, Microsoft, TCS,

13 35115

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)

Disney, Google, ZS Associates,

3 13240

Print an integer using only putchar. Try doing it without using extra storage.

2 19621

How to swap two variables, without using third variable ?

AB, ADP, BirlaSoft, Cisco, Cygnet Infotech, HCL, Hewitt, Honeywell, HP, IBM, Infosys, Manhattan, Microsoft, Mobius, Percept, Satyam, SofTMware, TCS, Wipro, Yamaha,

104 222872


Un-Answered Questions { Code Snippets }

i am trying to intigrate ejb and hibernate ,from session facade i am callind dao implemented through hibernate,i am getting a ClassDefNotFoundException for this org/hibernate/Session i ve set the class path at build path and in setEnv in weblogic still .........

1959


write a program that can LOCATE and INSERT elements in array using c++ programming languages.

3414


What is the functionality of GetWindowTextLength?

593


Cluster head selection in Wireless Sensor Network using C programming language.

3087


Pls provide basic funtionality Winrunner scripts for Health care domain and Phishing

1150






how to Auto Scroll the page

1621


How to Split Strings with Regex in Managed C++ Applications?

3098


Which tag is used to find the version of XML and the syntax?

361


How to export 2 datatables of a single dataset to 2 different worksheets of a single MSExcel file ?

1930


what is the structure of xml document ?

336


How comment can be represented in XML?

350


Given a string=”me,I,myself”; .Using javascript only create an array out of this string and then send a POST request to the url “record.php” without reloading the page. The post key parameters should be n1,n2 and n3 respectively.

2628


plz send code for feature rich resume builder in j2ee frontend:J2EE Backend: DB2 Express

3169


I'm calling a JS fcn that fires AJAX to a webmethod and returns a boolean. How do I retrieve the return value in the codebehind? (VB) I can set a hiddenfield value in the JS, but if it's async how can my VB know when it's changed?

670


What are the advantages of XML DOM Document?

357