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.
Answer Posted / miraj
When its given you are allowed to destroy the array..do
think in that direction..
Read the first element go to that position, read that
position and mark it zero.. keep doing so...
If at any place we find zero.. that means array contains
duplicate.
Is This Answer Correct ? | 19 Yes | 14 No |
Post New Answer View All Answers
How can you relate the function with the structure? Explain with an appropriate example.
3) Int Matrix of certain size was given, We had few valu= es in it like this. =97=97=97=97=97=97=97=97=97=97=97 1 = | 4 | | 5 | &= nbsp; | 45 =97=97=97=97=97=97=97=97=97=97=97 &n= bsp; | 3 | 3 | 5 | = | 4 =97=97=97=97=97=97=97=97=97=97=97 34 |&nbs= p; 3 | 3 | | 12 | &= nbsp; =97=97=97=97=97=97=97=97=97=97=97 3 | &nbs= p; | 3 | 4 | = | 3 =97=97=97=97=97=97=97=97=97=97=97 3 | = ; | | | = ; 3 | =97=97=97=97=97=97=97=97=97=97=97 &= nbsp; | | 4 | = ; | 4 | 3 We w= ere supposed to move back all the spaces in it at the end. Note: = If implemented this prog using recursion, would get higher preference.
create a C-code that will display the total fare of a passenger of a taxi if the driver press enter,the timer will stop. Every 10 counts is 2 pesos. Initial value is 25.00
What is data _null_? ,Explain with code when u need to use it in data step programming ?
#include
how to test pierrot divisor
Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange
Sir... please give some important coding questions asked by product companies..
Write a program to model an exploding firecracker in the xy plane using a particle system
Design an implement of the inputs functions for event mode
Set up procedure for generating a wire frame display of a polyhedron with the hidden edges of the object drawn with dashed lines
Write a routine to implement the polymarker function
could you please send the program code for multiplying sparse matrix in c????
Develop a routine to reflect an object about an arbitrarily selected plane
can you use proc sql to manpulate a data set or would u prefer to use proc report ? if so why ? make up an example and explain in detail