We have openings at Juniper Networks for Freshers & experienced guys.
Email me your resume at piyushj at gmail.com
Regards,
Piyush Jain
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To unsubscribe from this group and
to algogeeks+unsubscr...@googlegroups.com.
--
Piyush Grover
*Be a traveler, not a tourist*
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To unsubscribe from this group and stop receiving emails from it, send an email
to algogeeks+unsubscr
Hi,
Do you have a copy of competitive programming 2?
Please share
Regards,
Piyush
On Wed, Aug 24, 2011 at 7:24 AM, Cleber Adriani da Costa
cleberadri...@gmail.com wrote:
Hi guys, anyone have the link of the book COMPETITIVE PROGRAMMING
*Increasing the Lower Bound of Programming
Anyone interested in group booking of books?
I was thinking about these books:
Cracking Programming Interviews 350 Questions with Solutions by Sergei
Nakariakov
Effective Coding Interviews: Problems and Solutions Jian Lee
Programming Algorithms: Problems and Solutions Lin Quan
Top 10 coding
The problem is an array sorting problem.
You are given an array of size N containing values 1 to N only. Sort it in
O(N).
Start from floor 1 till ith floor until you find a person on the wrong
floor, take him to his respective floor
take the guy from that floor and take him to his respective
I have been trying to solve this problem using DP. i managed to realize the
problem in the form of recurrence..
The solution is:
Suppose the task was : given N pilots you have to assign N/2 of them as
captains and N/2 as assistances. Furthermore you need to do this in a way
such that for every
/12 Piyush Raman piyush2011...@gmail.com
I have been trying to solve this problem using DP. i managed to realize
the problem in the form of recurrence..
The solution is:
Suppose the task was : given N pilots you have to assign N/2 of them as
captains and N/2 as assistances. Furthermore you need
failed jobs) that can not be used in
further iterations
So basically the problem needs to be optimized on two aspects, minimizing
costs and maximizing the number of jobs to be executed.
Regards
Piyush
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
, Piyush Grover piyush4u.iit...@gmail.comwrote:
I have a practical problem, need an optimal solution for this
*What is given?*
Given *N* sets, each containing some jobs to be executed, such that no
two sets are subsets of each other and number of jobs in *i-th* set is *ni
N*.
The jobs can have
it will always work if array is statically allocated
Not if dynamically allocated, say using malloc etc.
On 30-Jan-13 1:55 PM, Prem Krishna Chettri wrote:
@Piyush .. Never works..
@All there is no way to do the given requirement in pure C.
On Wed, Jan 30, 2013 at 1:45 PM, Piyush piyush.to
sizeof(array)/sizeof(array[0])
On 28-Jan-13 3:44 PM, Anil Sharma wrote:
How to calculate the size/lenght of an int array which is
passed as an ONLY argument to a function???
--
You received this message because you are subscribed to the Google
Groups Algorithm Geeks
@Don can you give the logic of your rnd() function?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To unsubscribe from this group and stop receiving emails from it, send an email
to algogeeks+unsubscr...@googlegroups.com.
For more options,
On 18-Jan-13 1:57 PM, Sairam wrote:
Is it that all characters in a row, column and diagnol should be
considered?
For example
a b c d
c a t d
In this is cat a valid word?
yes
--
i will elaborate more
e b a t
m e m o
valid words
bat
at
be
to
am
me
memo
print them, not required
Given a MxN char array matrix, find all words in it. search left, right,
diagonally
--
:33 pm, Piyush piyush.to...@gmail.com
mailto:piyush.to...@gmail.com wrote:
Given a MxN char array matrix, find all words in it. search
left, right,
diagonally
--
--
--
http://www.spoj.com/problems/NWERC11A/
I have been trying to solve this problem but am getting TLE for larger
inputs.
Can't come up with an optimal approach!!
--
For simple reasons according to me:
1- It reduces overhead drastically,thus more efficient execution time is
achieved. Consider a recursive function call having array parameters -
func (int a[100][100], int b[100][100]).. Now instead if we use pointers-
func(int **a, int **b), the overhead on the
Use a set ADT ( C++ STL). Traverse the entire 2d matrix and keep on adding
each element to the set. The set ADT stores, sorts and removes redundant
data values and you get sorted list after traversal. Now again traverse the
set ADT and store it in an array.
On Wed, Jan 9, 2013 at 4:53 PM,
The number which has 5 as last digit can be written as
n = 4*a + b where b = 1 or 3
so if 4*a + 1 == n or 4*a + 3 == n; then n has 5 as a last digit.
So code looks like:
void main()
{
int n, m;
scanf(%d, n);
m = 2;
m = 2;
if(add(m, 1) == n || add(m,3) == n)
puts(yes);
else
puts(no);
}
forgot to assign:
m = n;
On Sun, Oct 14, 2012 at 2:27 AM, Piyush Grover piyush4u.iit...@gmail.comwrote:
The number which has 5 as last digit can be written as
n = 4*a + b where b = 1 or 3
so if 4*a + 1 == n or 4*a + 3 == n; then n has 5 as a last digit.
So code looks like:
void main
How can I find the expected number of tosses , required to obtain a
{HT,TH,TT} , by using random variables??
On Friday, December 31, 2010 8:27:46 PM UTC+5:30, Dave wrote:
@Anuj and Bittu: It is not necessary to know the bias. You can
simulate the flip of an unbiased coin with multiple flips
plz mail it to me too... piyushdur...@gmail.com
On Tuesday, July 31, 2012 7:37:03 PM UTC+5:30, deepikaanand wrote:
can anyone tell me the pattern (selection procedure )followed by directi
this year
--
You received this message because you are subscribed to the Google Groups
Algorithm
@ md shaukat ali: Hi ! Directi is visting our campus in this week. Can u
plz forward the paper that u mentioned to me. Thanx in advance.
*Piyush Khandelwal** | Placement Coordinator**,
Delhi Technological University
( Delhi College of Engineering )*
Mobile: 91-8447229204
www.dce.edu
Get
@ Purani : Hi ! Can u tell me, when was this test conducted.
*Piyush Khandelwal** | Placement Coordinator**,
Delhi Technological University
( Delhi College of Engineering )*
Mobile: 91-8447229204
www.dce.edu
Get a signature like this.
http://r1.wisestamp.com/r/landing?promo=17dest=http%3A%2F
@ashish jain :then what for aaab..
From: ashish jain ashishjainco...@gmail.com
To: algogeeks@googlegroups.com
Sent: Thursday, July 19, 2012 9:48 PM
Subject: Re: [algogeeks] Programming Problem
if from the string s.. a binary search tree (with higher value
connect ur form with the file you want to get redirected to by:
form method=POST action=NAME_OF_FILE.php
input type=submit/
/form
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group
, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
You received
A correction, it is *(2^p) - 1 *, and the answer (*2^(number of primes less
than n)) - 1* .(It is simply taking any subset of the primes,leaving the
one in which do not take any prime)
On Sun, Jun 10, 2012 at 10:03 PM, Piyush Kapoor pkjee2...@gmail.com wrote:
The problem simply asks you
to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
*Piyush Khandelwal***
Mobile No: 91-8447229204
91-9808479765
--
You received this message because you are subscribed to the Google Groups
Algorithm
@Partha
try with:
A = {2, 2, 9}
B= {1, 6, 6}
On Mon, May 21, 2012 at 7:08 PM, partha sarathi Mohanty
partha.mohanty2...@gmail.com wrote:
a[] = [-1,-3,4,0,7,0,36,2,-3]
b[] = [0,0,6,2,-1,9,28,1,6]
b1[] = [0,7,0,36,4,-6,3,0,0]
b2[] =[-1,-3,11,0,0,0,35,0,0]
suma = 42 proda = -84*72*3
this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
*Piyush Khandelwal***
Mobile No: 91-8447229204
91-9808479765
--
You received this message because you are subscribed
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
*Piyush Khandelwal**
*Contact: 91-8447229204
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks
=en.
--
*Piyush Khandelwal***
Mobile No: 91-8447229204
91-9808479765
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send
.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
*Piyush Khandelwal**
*Mobile No: 91-8447229204
--
You received this message because you are subscribed
:
@piyush : i dont think so BIT would work over here , we are not just
reporting cumulative sum tilll index i.
On Mon, Mar 12, 2012 at 12:58 AM, Piyush Kapoor pkjee2...@gmail.comwrote:
This can be done very easily with the help of a Binary Indexed
Tree,and it is very short to code as well.Simply
1)First map the array numbers into the position in which they would be, if
they are sorted,for example
{30,50,10,60,77,88} --- {2,3,1,4,5,6}
2)Now for each number ,find the cumulative frequency of index ( = the
corresponding number in the map - 1).
3)Output the cumulative frequency and increase
.
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr
xy is a mixed expression involving two operands of different types,one of
unsigned int and other signed int.Since implicit type conversion takes
place in such cases,the signed int is converted to unsigned int ,which
means that
-2(signed) is converted to
4294967294 (unsigned) .,and then the
Hi Coders ,
The felicity team , IIIT -Hyderabad presents the Gordian Knot .
*Global Test run is going on and will end by today(i.e. 24th january)
midnight (Indian Stand. Time) .
*Main Event: Starts at 10:00 AM (Indian Stand. Time) 25th January and Ends
at 5:00 PM(Indian Stand. Time) 26th
) ==
(N-1)C2
4)Using exactly 3 'H's::== (N-2)C3
and so on..
Answer = = 1+NC1 + (N-1)C2 + (N-2)C3 + . (till N-r =r)
which is same as fibonacci series.
So the answer was the fibonacci number divided by (2^n)
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
You received this message because
you can do it in nlogk or n+klogn time.
create a min-heap tree of size k with first k nodes.
Add k+1..n nodes in the tree. Everytime you insert a node in the tree check
if it's greater than the root node. If yes remove
root node and insert the new node (logk operations). So time complexity
will
Given a set S, find all the maximal subsets whose sum = k. For example, if
S = {1, 2, 3, 4, 5} and k = 7
Output is: {1, 2, 3} {1, 2, 4} {1, 5} {2, 5} {3, 4}
Hint:
- Output doesn't contain any set which is a subset of other.
- If X = {1, 2, 3} is one of the solution then all the subsets of X {1}
:
@Piyush :
you are re-posting same problem which you had posted on 5 dec 2011.
check this link :-
http://groups.google.com/group/algogeeks/browse_thread/thread/8a58ea05c96f811b/ee74f8a4d7b68561?lnk=gstq=Maximal+possible+subsets+Algorithm#ee74f8a4d7b68561
On Mon, Jan 9, 2012 at 3:27 AM, Piyush
.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Regards,
Piyush Kansal
--
You received
.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Regards,
Piyush Kansal
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
://groups.google.com/group/algogeeks?hl=en.
--
Regards,
Piyush Kansal
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks
Hey Ankur,
What is the order of time complexity we are looking for in this case. The
option which Dave suggested can give us random node by traversing that many
number of nodes from the head. That will be O(n).
This can be further reduced to n/2 if we use two pointers, both of which
will
insertNode(node *head, int value){
node *new;
if(head == null){
new = (node*)malloc(sizeof(node));
new-data = value;
new-left = new-right = new-inoredrsucc = null;
head = new;
}else{
node *root = head;
node *l, *r;
- right
22-left = 22-right = null; 22-succ = 18-succ = null; 18-right =
18-succ = 22;
and so on...
On Sat, Dec 10, 2011 at 6:49 PM, AMAN AGARWAL mnnit.a...@gmail.com wrote:
Hi Piyush,
I tried with the following data 15,13,18,22,21. I think your code is not
giving proper inorder succ of node 18
not taken that into consideration.
Please correct me if I am wrong.
Regards,
Aman,
On Sat, Dec 10, 2011 at 7:37 PM, Piyush Grover
piyush4u.iit...@gmail.comwrote:
I don't think so.
First you added 15.
15-left = null=15-right=15-succ;
add 13. (13 15) so
13-left = 13-right = null; 13-succ
-Piyush
On Sat, Dec 10, 2011 at 8:28 PM, AMAN AGARWAL mnnit.a...@gmail.com wrote:
Hi.
So can you please tell me the modifications required so it works correctly.
Regards,
Aman.
On Sat, Dec 10, 2011 at 8:22 PM, Piyush Grover
piyush4u.iit...@gmail.comwrote:
yup, you are right..
On Sat, Dec
:
The possibility is ruled out by your question itself.There are exponential
subsets of a set,so finding all subset is not possible in polynomail time.
A backtracking approach is what you should think on,
On Mon, Dec 5, 2011 at 12:51 PM, Piyush Grover
piyush4u.iit...@gmail.comwrote:
Given a set S
Solution:
{1, 2, 3} {1, 2, 4} {1, 2, 5} {1, 3, 4} {3, 5}
On Mon, Dec 5, 2011 at 2:38 PM, sourabh sourabhd2...@gmail.com wrote:
@ Piyush..
I have a doubt... Is there any significance of the value Vi, if yes
then can u give an example.
If not, then is your question about finding all maximum
As I mentioned earlier solution with exponential time-complexity is the
obvious one. Is there any way to solve this problem by greedy/Dynamic algo?
On Mon, Dec 5, 2011 at 5:24 PM, WgpShashank shashank7andr...@gmail.comwrote:
@piyuesh , Saurabh isn't 3-Sum Suffics Here ?
Another thought
(polynomial if exists).
Thanks
Piyush
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more
Optimal split: [0,0][1,1][0,0][1,1][0,1][1,0]
Expected value of optimal split: 0 + 1 + 0 + 1 + 1/2 + 1/2 = 3
why this is not the optimal split???
On Sun, Nov 27, 2011 at 6:58 PM, Ankur Garg ankurga...@gmail.com wrote:
You have an array with *n* elements. The elements are either 0 or 1. You
, Nov 22, 2011 at 1:59 PM, anshu mishra
anshumishra6...@gmail.comwrote:
first try to understand the sol then comment. it is for binary tree not
for BST.
On Mon, Nov 21, 2011 at 10:25 PM, Piyush Grover
piyush4u.iit...@gmail.com wrote:
For BST it would be rather simpler. find the first node
For BST it would be rather simpler. find the first node which lies in
between the two.
On Wed, Nov 16, 2011 at 1:44 PM, anshu mishra anshumishra6...@gmail.comwrote:
Node *LCA(node *root, node *e1, node *e2, int x)
{
Node *temp =NULL;
Int y = 0;
As you mentioned, the numbers designating the gaps can only be repeated
so in your example 2 20 can be broken into 19 1 but 19 is already there in
the list (the
first couplet) and it's not the one which describes the gap. can you please
clarify?
On Mon, Nov 21, 2011 at 5:23 AM, Ankur Garg
b) Binary search
Binary search has to be done in O(logn) but in a linked list individual
elements can't be
accessed in O(1) time. and hence its not suitable to have a linked list as
a data structure in
binary search.
--
You received this message because you are subscribed to the Google Groups
Has to be (d) Radix sort (using counting sort, which will sort
the individual digits in O(n) time).
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this
Suppose the array is not sorted and we have to find if an element has
occurred earlier or not; and if yes, then remove
it.what is the best achievable time and how?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
.
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com
In which library do powl() and log10l() lie(they r not in cmath,i think)
,can anybody post a good reference to these..(I could not find much on
googling)
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
You received this message because you are subscribed to the Google Groups
Algorithm
Yes these are in cmath(or math.h) ,
/* 7.12.6.8 Double in C89 */
extern float __cdecl log10f (float);
extern long double __cdecl log10l (long double);
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
You received
Given array A.
Compute array B such that
B[0] = 1;
for(i = 1; i n; i++)
B[i] = B[i-1]*A[i-1]
now,
mul = 1;
for (i = n-2; i =0; i--){
mul = mul*A[i];
B[i] = B[i]*mul;
}
On Fri, Sep 30, 2011 at 2:18 AM, Hatta tmd...@gmail.com wrote:
are the algorithm instance always a sequence
sorry, one mistake...
mul = mul*A[i];
it should be
mul = mul*A[i+1]
On Fri, Sep 30, 2011 at 2:57 AM, Piyush Grover piyush4u.iit...@gmail.comwrote:
Given array A.
Compute array B such that
B[0] = 1;
for(i = 1; i n; i++)
B[i] = B[i-1]*A[i-1]
now,
mul = 1;
for (i = n-2; i =0; i
Algorithm Geeks group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
*Regards,*
*Piyush Kapoor
as such there is no specific method to generate random number but if you
have to implement it then you can generate a pseudo random generator
using cur_time_value_in_mili_seconds mod n.
On Mon, Sep 19, 2011 at 9:24 PM, Don dondod...@gmail.com wrote:
The most common way that it works would be
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Piyush Agarwal
Final Year Undergraduate
Department of Computer Engineering
Malaviya National Institute of Technology
Jaipur
--
You received this message because you are subscribed to the Google Groups
for(i = 0; i n; i++)
for(j = 0; j n; j++){
setColor(i, j) = black;
if(A[i][j] == str[0]){
setColor(i, j) = blue;
a = findWord(A, i, j, str, 1)
if(!a) setColor(i, j) = black;
else break;
}
}
findWord(A, i, j, str, k){
if(k
sry, in the findWord function all a's are different e.g
a0, a1a7
and if(!a) is actually if(a0||a1||...||a7)
thnx
piyush
On Mon, Sep 19, 2011 at 1:10 AM, Piyush Grover piyush4u.iit...@gmail.comwrote:
for(i = 0; i n; i++)
for(j = 0; j n; j++){
setColor(i, j) = black
a number z is: (n-1)/n *(n-2)/(n-1) *
1/(n-2) = 1/n
and so on. So selection of any number at any position is independent of any
number being selected. So
they have independent and uniform probability.
-Piyush
On Sat, Sep 17, 2011 at 10:42 PM, sivaviknesh s sivavikne...@gmail.comwrote:
Write
Don is right
if R = 0, P = 1 and Q = -1 then the given expression is UNDEFINED!!!
On Thu, Sep 15, 2011 at 10:16 PM, abhinav gupta
guptaabhinav...@gmail.comwrote:
Shut up...its 3,,
On Thu, Sep 15, 2011 at 9:43 AM, Don dondod...@gmail.com wrote:
It might be 3, but it doesn't have to
to 3.
Don
On Sep 15, 11:57 am, abhinav gupta guptaabhinav...@gmail.com wrote:
u cnt divide a number by 0..that thing is self undrstod
On Thu, Sep 15, 2011 at 9:49 AM, Piyush Grover
piyush4u.iit...@gmail.comwrote:
Don is right
if R = 0, P = 1 and Q = -1 then the given
it should be:
(1/n)^n * (1 + 2 + 2^2 + 2^3 +(n/2)+1 terms) = {2^(1 + n/2) - 1}*(1/n)^n
when n even
(1/n)^n * (1 + 2 + 2^2 + 2^3 +(n-1/2)+1 terms) = {2^(1 + (n-1)/2) -
1}*(1/n)^n when n is odd
-Piyush
On Mon, Sep 12, 2011 at 8:01 PM, sandeep nagamalli nsandee...@gmail.comwrote
Sry i was little wrong:
nC0*(1/n)^n + nC2 *2*(1/n)^n + nC4*2^2*(1/n)^n++nCn*2^(n/2)*(1/n)^n
when n is even
nC0*(1/n)^n + nC2 *2*(1/n)^n +
nC4*2^2*(1/n)^n++nCn-1*2^(n-1/2)*(1/n)^n when n is odd
On Mon, Sep 12, 2011 at 10:08 PM, Piyush Grover
piyush4u.iit...@gmail.comwrote:
it should
O(n^4)
Just think...
for(i = 0; i n; i++)
for(j = 0; j i; j++)
has Time Complexity O(n^2)
then how come for(i = 0; i n; i++)
for(j=0; ji*i; j++)
it's O(n^2)..
it's...1 + 2^2 + 3^2 + ...n^2 which is O(n^3)
but adding one for(k=0; k j; k++) will not make
I got..
1.) 2/pi
2.) 3.) 0.5 - (1/pi)
On Sat, Sep 10, 2011 at 2:47 PM, Ishan Aggarwal
ishan.aggarwal.1...@gmail.com wrote:
three points are randomly chosen on a circle.what the probability that
1.triangle formed is right angled triangle.
2.triangle formed is acute angled triangle.
Sorry guys.. I was wrong, radius also matters here...
still investigating
On Sat, Sep 10, 2011 at 3:56 PM, sarath prasath prasathsar...@gmail.comwrote:
@Piyush Grover:
please explain ur answer
On Sat, Sep 10, 2011 at 3:30 PM, Piyush Grover
piyush4u.iit...@gmail.comwrote:
I got
be 1/3 for each of the three options...
On Sat, Sep 10, 2011 at 4:48 PM, Piyush Grover
piyush4u.iit...@gmail.comwrote:
Sorry guys.. I was wrong, radius also matters here...
still investigating
On Sat, Sep 10, 2011 at 3:56 PM, sarath prasath
prasathsar...@gmail.comwrote:
@Piyush
it would be close to zero but not exactly zero.
On Sat, Sep 10, 2011 at 6:28 PM, Ishan Aggarwal
ishan.aggarwal.1...@gmail.com wrote:
How u calculated this??
On Sat, Sep 10, 2011 at 6:19 PM, Neha Singh neha.ndelhi.1...@gmail.comwrote:
The correct ans is :
for right angled triangle : 0
pseudo algo:
=array idx[0...k-1] indicates the current pointer position in the ith
stream(initialized to 0).
=heap tree of size k where each node stores value of the data and value of
stream which the node belongs to.
do{
for all i = 0:k-1
=insert idx[i] value of ith stream to the
group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
It depends on the use cases.
If you have less elements of order of( say 100) then even insertion sort can
be a better choice. It's in-place sorting algo and can
perform sorting as it receives the elements like a stream.
If you have large number of elements and all the elements can't be
to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post
Option a) i didn't understand properly, please elaborate!!
Option b) certainly yes.
Option c) No (remember, the size of the table is subjective)
Option d) yes (use index on the column used in the where clause)
On Wed, Sep 7, 2011 at 8:58 PM, Mani Bharathi manibharat...@gmail.comwrote:
when
i don't think it's of O(n)
for even it's actually easy. Take the xor of all the elements you will left
with the element which appears odd number of times. O(n)
but for the odd case, we need to use extra space. Use hash map to keep the
count of each number and
take the odd one out, i mean the even
1.)a
2.)b
3.)b
4)b
On Wed, Sep 7, 2011 at 11:08 PM, Mani Bharathi manibharat...@gmail.comwrote:
“Kya-Kya” is an island inhabitants of which always answer any question with
two
answers , one of which is true and the other is false .
1.You are walking on a road and came to a park . You ask
4) a and b
On Thu, Sep 8, 2011 at 12:08 AM, Piyush Grover piyush4u.iit...@gmail.comwrote:
1.)a
2.)b
3.)b
4)b
On Wed, Sep 7, 2011 at 11:08 PM, Mani Bharathi manibharat...@gmail.comwrote:
“Kya-Kya” is an island inhabitants of which always answer any question
with two
answers , one
it's a subjective question.
If you have 100GB of main memory and 2 GB of virtual memory and you are
running very light weight programs then
nothing will happen. The system memory has enough space to take care of all
the applications but if your system is heavily loaded with
processes then it
#includestdio.hvoid swap(char *, char *);
int main()
{
char *pstr[2] = {Hello, piyush};
swap(pstr[0], pstr[1]);
printf(%s\n%s, pstr[0], pstr[1]);
return 0;
}void swap(char *t1, char *t2)
{
char *t;
t=t1;
t1=t2;
t2=t;
}
--
Piyush Agarwal
Final Year Undergraduate
One thing i would like to know is
01/02/2011 needs to be considered or 1/02/2011.
thnx
On Mon, Sep 5, 2011 at 11:48 PM, Neha Singh neha.ndelhi.1...@gmail.comwrote:
@yogesh: its stiil not correct. There r many test cases where ur solution
will fail
--
You received this message because you
://groups.google.com/group/algogeeks?hl=en.
--
Piyush Agarwal
Final Year Undergraduate
Department of Computer Engineering
Malaviya National Institute of Technology
Jaipur
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email
use hashing u'll get O(1) space..
@rahul...why not??
On Sat, Sep 3, 2011 at 7:13 PM, priya ramesh love.for.programm...@gmail.com
wrote:
use hashing
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to
to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Piyush Agarwal
Final Year Undergraduate
Department of Computer Engineering
Malaviya
@Dave..:-O well catch...
On Sat, Sep 3, 2011 at 9:00 PM, Dave dave_and_da...@juno.com wrote:
@Piyush: Try your code with
n = 10
a[10] = {11,22,33,44,55,66,77,88,99,110}
b[10] = {10,20,30,40,50,60,70,80,90,100}
Your code gets
(110, 100) = 210
(110, 90) = 200
(99, 100) = 199
(110, 80
email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
*Regards,*
*Piyush Kapoor,*
*2nd year,CSE
IT-BHU*
--
You received
if I have understood the question correctly then:
a[n-1] + b[i] a[j] + b[i] for all 0 = j n-1
and a[j] + b[n-1] a[j] + b[i] for all 0 = i n-1
therefore,
i = j =n-1;
count = 1;
S[0] -- (a[n-1], b[n-1])
p = a[n-1] + b[n-2];
q = a[n-2] + b[n-1]
while(count n){
if(p q){
j--;
1 - 100 of 368 matches
Mail list logo