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.

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

21 29738

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

Microsoft, Mentor Graphics,

2 17681

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

Fusion Systems GmbH,

6 12662




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

Microsoft,

10 14301

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 6545

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 22127

program to Reverse a linked list

Microsoft, Aricent, Ness Technologies,

12 47831

write a program to Insert in a sorted list

Microsoft,

4 9990

Program to Delete an element from a doubly linked list.

Infosys, College School Exams Tests,

4 27602

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

Amazon, Adobe, EFI, Imagination Technologies,

13 75539

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

Microsoft,

3 13346

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

TCS, Intel, Microsoft,

12 24354

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 9724

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

2 13929

How to swap two variables, without using third variable ?

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

104 176049







Un-Answered Questions { Code Snippets }

What is data _null_? ,Explain with code when u need to use it in data step programming ?

1780


How we work on N tire architecture in asp.net Please give me Examle...

14610


Write a function that takes an array of integers and efficiently calculates and returns the Least Common Multiply in python.

547


We need to write the function to check the password entered is correct or not based on the following conditions.. a) It must have atleast one lower case character and one digit. b)It must not have any Upper case characters and any special characters c) length should be b/w 5-12. d) It should not have any same immediate patterns like abcanan1 : not acceptable coz of an an pattern abc11se: not acceptable, coz of pattern 11 123sd123 : acceptable, as not immediate pattern adfasdsdf : not acceptable, as no digits Aasdfasd12: not acceptable, as have uppercase character

3203


What is the coding about how to recognize color in fuzzy logic using Matlab R2009b?

918






Who could write how to find a prime number in dynamic array?

1204


How to Check if Folder Exists?

409


code to images to rollover

1148


how to create a search bar which access data from various websites and retrieves the data

1746


Code for Method of Handling Factorials of Any Size?

1248


write a vb script to check equal two 2*2 matrix

303


how to test the orientation of the layout in android.to note any changes in the ui design when change orientation

1847


Dear sirs, Hi, I would like to inform you that I want to perform a project using MLP neural network to recognize binary images containing three types of geometric shapes such as squares,rectangels and circles. Furthermore,each image includes only one geometric type. The output of network would be: '1' if the network detects square shape. '2' if the network detects rectangle shape. '3' if the network detects circle shape. '4' if none of these shapes detected. Would you please send me a matlab source code for this project? Your prompt reply would be so appreciated. regards,

1107


1.What type of material can be sent from a Java servlet to a browser ? How does the browser know how to deal with the material? 2.Explain what happens to a servlet when a servlet engine is sent a GET request.

1387


Code for Two Classes for Doing Gzip in Memory?

1991