Given an undirected graph G = (V, E), for any subset of nodes S ⊆ V we can
construct a graph Gs from G by removing all nodes in S together with their
incident edges. In the critical node problem (CNP), we are given an integer
1 ≤ k ≤ |V | and need to find a subset S of size k such that the graph
@ Dev Thanx.
On Thu, Oct 11, 2012 at 1:25 AM, Dave dave_and_da...@juno.com wrote:
@Mohit: The decimal representation of a number ends in 5 if its low order
bit is 1 and it is divisibile by 5.
An algorithm using bitwise operations to check for divisibility by 5 is
given at
https
--
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
I think answer would be 6C3*3!. ie 120.
On Fri, Sep 7, 2012 at 10:20 AM, Navin Kumar algorithm.i...@gmail.comwrote:
@tendua: Answer will be 6C3 x 3! .
For example: If 5 letters are given then you can get only 10 combination
of different letter = 5C3
ABC
ABD
ABE
BCD
BCE
CDE
ACD
ACE
1.) Find the pivot point. to find pivot – for a sorted (in increasing
order) and pivoted array, pivot element is the only only element for which
next element to it is smaller than it.
2.) divide the array into two subarray and apply binary search.
for calling binary search in two subarray - if
Scan first array check repeated values as in example( rt_triangle(4, {0,
-1, -1, 1}, {1, -2, 1, -2}))
-1,-1 is repeated twice at indices in array respectively 1and 2.
now in second y-axis array check values at indices given by first array (in
above example these values are -2 and 1 respectively)
here are the steps :
1) Construct a temporary array left[] such that left[i] contains product of
all elements on left of A[i] excluding A[i].
2) Construct another temporary array right[] such that right[i] contains
product of all elements on on right of A[i] excluding A[i].
3) To get OUT[],
yeah we can do it without using an extra array too. first calculating the
product of elements on its left and putting in OUT[] and then multiplying
with the product of elements on its right . no auxiliary space used.
On Thursday, August 16, 2012 2:26:58 PM UTC+5:30, ram wrote:
Hi,
+1 naveen
On Thursday, June 28, 2012 8:29:26 PM UTC+5:30, Navin Gupta wrote:
Keep two pointers - one at start of the array and other at end of the
array
Now current points to start of the array
If current is negative , increment current
If current is positive , swap it with the element
What would be the diameter in case of a left skewed or right skewed tree?
On Mon, Jun 25, 2012 at 12:48 PM, atul anand atul.87fri...@gmail.comwrote:
consider a case where tree is right skewed or left skewed , in dat case
max distance b/w two node found are root and leftmost or rightmost
Hi,
*There are two arrays of length 100 each. Each of these has initially n
(n=100)
elements. First array contains names and the second array contains numbers
such that ith name in array1 corresponds to ith number in array2.
Write a program which asks the user to enter a name, finds it in
...@gmail.comwrote:
example pls...
On Thu, Jun 14, 2012 at 1:01 PM, Mohit Rathi mohit08...@iiitd.ac.inwrote:
Hi,
*There are two arrays of length 100 each. Each of these has initially n
(n=100)
elements. First array contains names and the second array contains numbers
such that ith name in array1
In const char *a; and char const *a;both represent the same thing.
i.e. the string whose address is store in pointer a is not changeable,but
the pointer a can store address of another string
if const char *a =Hello; /*string is fixed pointer is not*/
then *a='A';/*Error*/
a=Hi;
Introduction To Algorithms By Clifford Stein, Thomas H Cormen, Ronald L
Rivest, Charles E Leiserson
On Tue, Jun 5, 2012 at 12:32 PM, arun prakash arunslb...@gmail.com wrote:
Can anyone pls mail me good datastrucutre and algo books..or any link to
download those books..thanks in advance
just check first for the right child of node if (right*[**x**]** ≠* NIL ) and
then first call print method for right child
Algorithm 3 Print(x)
1: if (*x **≠* NIL) then
2: print *colour **[**x**]*
3: if (right*[**x**]** ≠* NIL) then
4: Print (right*[**x**]**)*
5:
congrats :-)
On Wed, Feb 29, 2012 at 10:56 AM, shady sinv...@gmail.com wrote:
congrats :)
keep participating and keep learning.
On Wed, Feb 29, 2012 at 9:19 AM, atul anand atul.87fri...@gmail.comwrote:
congo :)
On Wed, Feb 29, 2012 at 5:30 AM, Varun Nagpal varun.nagp...@gmail.comwrote:
check it now ... register your team and engage in codewar ..
--
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
...@gmail.com wrote:
@Mohit
Suppose for example
String: NITAN
LCS(Longest Common Subsequence) : NIN
How do you get the palindrome with it?
On Dec 15, 3:47 am, Lucifer sourabhd2...@gmail.com wrote:
@Mohit
I think what he meant is 2* strlen(Input
to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Mohit kumar lal
rit2009014
IIIT ALLAHABAD
contact@9454681805
kumarmohit...@gmail.com
mohitkumar...@yahoo.com
rit2009...@iiita.ac.in
http://profile.iiita.ac.in/rit2009014
such
algo?
On Tue, Nov 29, 2011 at 2:55 AM, Mohit kumar lal
kumarmohit...@gmail.comwrote:
Given a array of positive integers ,You have to find the largest sum
possible from consecutive sub-array but sum should be less than or equal to
K and also find that sub-array. Ex- array={2,1,3,4,5} k
it by DP
but complexity were same ( O(n^2)) so plz try to provide a solution for
O(nlgn) or O(n).
--
Mohit kumar lal
IIIT ALLAHABAD
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks
to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Mohit
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks
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.
--
Mohit
--
You received this message because you are subscribed
@ myself
Dave's solution works fine. I should have close look at it.
On Sat, Nov 5, 2011 at 12:17 PM, mohit verma mohit89m...@gmail.com wrote:
@ Dave
I think your solution wont work for the cases like (MAX_INT) C
(MAX_INT-1).
On Thu, Nov 3, 2011 at 10:20 PM, vaibhavmitta...@gmail.com
...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Mohit
--
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
this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Mohit
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send
put some light on this topic?
--
Mohit
--
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
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.
--
Mohit
--
You received
need to
consider the index of the array as the the vertices and the weigjht as
the the value for the movement from the present vertex to it's
connecting neighbour ..
On 10/31/11, mohit verma mohit89m...@gmail.com wrote:
Given a matrix you have to find the shortest path from one point
For the array .. And for K=3
Ur algo will give (1 1 1) (1 1 1 ) (3 5 6)
On 10/30/11, mohit verma mohit89m...@gmail.com wrote:
sort the array : O(nlogn)
keep an array/map containing frequency of each element in sorted array :
O(n)
v[n/k][k] - 2-D array of ints containing final partitions
yeah , my algo wont work for these cases :(.
On Mon, Oct 31, 2011 at 6:32 PM, sunny agrawal sunny816.i...@gmail.comwrote:
@Mohit
that will also not work
example: {1,1,1,2,2,2,3,3,3}
i think all the methods that try to fill the matrix(considering k sets as
k rows) either horizontally
thnx all
On Mon, Oct 31, 2011 at 10:13 PM, Vandana Bachani vandana@gmail.comwrote:
Hi Mohit,
Bellman-Ford algorithm is a dynamic programming algorithm but u need it
only if dijkstra's SP wont solve the problem... and Dijkstra's algo works
only for +ve weights. So if u r sure
+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Mohit
--
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
@shashank , i agree.
To reduce this overhead , we can implement prefix trie in bit-form or DAWG
or lots of compression techniques are there at the cost of complex coding.
On Tue, Nov 1, 2011 at 12:35 AM, WgpShashank shashank7andr...@gmail.comwrote:
@Mohit Space Overhead Will be more if m,n
.
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.
--
Mohit
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post
)--(1,1)---(2,2). Path cost -
5+3+2+1=11
I dont think some DP solution exist for this problem.Can it be?
--
Mohit
--
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
+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Mohit
--
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
ohh , the number can repeat itself. I dint notice that.
On Fri, Oct 28, 2011 at 4:02 PM, mohit verma mohit89m...@gmail.com wrote:
something like this :
for(int i=0;temp=sum , isum/2;i++)
{ temp=temp-i;
for(int j=i+1;jtemp;j++)
couti j temp-j\n;
}
But there is a problem with code
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.
--
*MOHIT VERMA
to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Mohit
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email to algogeeks
.
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.
--
*MOHIT VERMA*
--
You received this message because you are subscribed to the Google Groups
Algorithm
.
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.
--
*MOHIT VERMA*
--
You received this message because you are subscribed to the Google Groups
Hello yar,
Please share the written paper format and interview questions.
If dont want to display openly, plz share with my id mohitm.1...@gmail.com.
It will be of great help to me.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this
Hello everyone,.
I am 3rd yr student from IIIT Allahabad,i want to know what
companies I can apply for summer(2012) internship and what is the process
for applying in these companies.My CGPI is around 8.Please reply as soon as
possible.
--
Mohit kumar lal
rit2009014
IIIT ALLAHABAD
contact
this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
*MOHIT VERMA*
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
Has anyone recently attended the placement procedure for paypal.
Like how is it?
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/WzkQbuBpGlkJ.
To post to
If i have to code the functioning of grep
what data structure is recommended for implementing it.
I was thinking may be using trie with each node having a vector list of line
numbers in which they appear.
Is it the correct one or is there any better solution to this.
--
You received this
around 25th
65
arnd 8
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/7FtN8hsesrgJ.
To post to this group, send email to algogeeks@googlegroups.com.
To
.
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.
--
*MOHIT VERMA*
--
You received this message because you are subscribed to the Google Groups
How many processes are created in this snippet?
Main()
{
Fork();
Fork() fork () || fork ();
Fork ();
}
--
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
a. 15
b. 19
c. 21
d. 27
e. 31
these are the only options.
--
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
20 is not in option ..so whats the answer??
--
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
thnks everyone...
--
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
1) #include stdio.h
#include stdlib.h
#define SIZEOF(arr) (sizeof(arr)/sizeof(arr[0]))
#define PrintInt(expr) printf(%s:%d\n,#expr,(expr))
int main ()
{
/* The powers of 10 */
int pot[] = {
0001,0010,0100,1000
};
int i;
got it ..!! thnks everyone
--
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
1) #include stdio.h
#define PrintInt(expr) printf(%s : %d\n,#expr,(expr))
int max(int x, int y)
{
(x y) ? return x : return y;
}
int main ()
{
int a = 10, b = 20;
PrintInt(a);
PrintInt(b);
PrintInt(max(a,b));
}
2#include stdio.h
void
this group at
http://groups.google.com/group/algogeeks?hl=en.
--
*MOHIT VERMA*
--
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
it would be better if we insert values in array in while loop and then
outside call makeheapk() and then return topheap();
this will reduce the heap making complexity.
On Sun, Sep 4, 2011 at 2:29 PM, mohit verma mohit89m...@gmail.com wrote:
int funkth(node *root,int k)
{
queuenode * q
?hl=en.
--
*MOHIT VERMA*
--
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
.
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.
--
*MOHIT VERMA*
--
You
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.
--
*MOHIT VERMA*
--
You received
this line is unnecessary
if(result[i]==1) continue;
I think this algo is good enough. But any improvements?
--
*MOHIT VERMA*
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send
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.
--
*MOHIT
Ohh my bad. the complexity should be
O(nlogn) + O(mlogm) +O(m) = O(tlogt) where t=max(m,n)
On Sat, Sep 3, 2011 at 11:46 PM, mohit verma mohit89m...@gmail.com wrote:
create a binary search tree by scanning the whole array and if the value
already exists increase count field in that node O(nlogn
, mohit verma mohit89m...@gmail.comwrote:
Ohh my bad. the complexity should be
O(nlogn) + O(mlogm) +O(m) = O(tlogt) where t=max(m,n)
On Sat, Sep 3, 2011 at 11:46 PM, mohit verma mohit89m...@gmail.comwrote:
create a binary search tree by scanning the whole array and if the value
already exists
...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Mohit kumar lal
rit2009014
IIIT ALLAHABAD
contact@9454681805
kumarmohit...@gmail.com
mohitkumar...@yahoo.com
rit2009...@iiita.ac.in
http://profile.iiita.ac.in/rit2009014
--
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.
--
Mohit kumar lal
rit2009014
IIIT ALLAHABAD
contact@9454681805
kumarmohit...@gmail.com
mohitkumar...@yahoo.com
.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
Mohit kumar lal
rit2009014
IIIT ALLAHABAD
contact@9454681805
kumarmohit...@gmail.com
mohitkumar...@yahoo.com
rit2009...@iiita.ac.in
http://profile.iiita.ac.in/rit2009014
--
You received this message because
.
--
*MOHIT VERMA*
--
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
email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
*MOHIT VERMA*
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post
=O(nlog n) for random k.
On Wed, Aug 31, 2011 at 9:15 PM, mohit verma mohit89m...@gmail.com wrote:
@ dave- commplexity of radix sort is = O(n log n). so better use heap
sort.
On Wed, Aug 31, 2011 at 4:07 PM, Dave dave_and_da...@juno.com wrote:
@Bharatkumar: You've tacitly assumed
.
--
*MOHIT VERMA*
--
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
Is anything specific about digits of numbers given in above question? If no
then as i said
Yeah coz we compare the radix part in radix sort , so can't say exactly we
are comparing the numbers (but portion of it)
On Wed, Aug 31, 2011 at 9:27 PM, Dave dave_and_da...@juno.com wrote:
@Mohit
@mac - yeah you were right.
Normally we number the vertices and forget about their co-ordinates in
programming :)
--
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
that is what i said in above post. By portion or radix i mean : digit if
numbers are being sorted at radix 10.
On Wed, Aug 31, 2011 at 9:43 PM, Dave dave_and_da...@juno.com wrote:
@Mohit: As I said, a radix sort does not use data comparisons. It
extracts digits from the sort keys and uses
*1.*
/* Print armstrong numbers from 1 to 500 */
/*1st version of prgrm: I am using pow function*/
#includestdio.h
#includeconio.h
#includemath.h
int main()
{
int num=1,temp,sum,r;
while(num=500){
sum=0;
temp=num;
while(temp){
r=temp%10;
sum+=pow(r,3);
temp/=10;
}
This code may also work .give any counter examples...
#includeiostream
using namespace std;
void find_sum(int num,int k,int j,int b);
void display(int i,int j);
#define MAX 8
int res[4]; //array to store
4 numbers..
int arr[MAX]
.
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.
--
Mohit kumar lal
rit2009014
IIIT ALLAHABAD
contact
.
--
*MOHIT VERMA*
--
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
.
--
*MOHIT VERMA*
--
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
7 8
2 4 2
1 3
9
Could someone pleases modify this solution to print tree in top-down
fashion?
On Sun, Aug 28, 2011 at 11:38 PM, Rishabbh A Dua duarish...@gmail.comwrote:
mohit, wat if the tree is growing dynamically?
On Sun, Aug 28, 2011 at 11:27 PM, mohit verma mohit89m
I think for that we need to re-traverse the tree - in first recursion
counting the levels and second time printing values and spaces accordingly.
On Sun, Aug 28, 2011 at 11:50 PM, mohit verma mohit89m...@gmail.com wrote:
i 've already mentioned if number of levels is known. Well for dynamic
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.
--
*MOHIT VERMA*
--
You received
@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.
--
Mohit kumar lal
rit2009014
IIIT ALLAHABAD
contact@9454681805
kumarmohit...@gmail.com
mohitkumar
without using extra
map?
--
*MOHIT VERMA*
--
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
options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
*MOHIT VERMA*
--
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
://groups.google.com/group/algogeeks?hl=en.
--
Mohit kumar lal
rit2009014
IIIT ALLAHABAD
contact@9454681805
kumarmohit...@gmail.com
mohitkumar...@yahoo.com
rit2009...@iiita.ac.in
http://profile.iiita.ac.in/rit2009014
--
You received this message because you are subscribed to the Google Groups
from array 1 on array 2?
overall complexity : O(nlogn)
On 14 August 2011 18:46, mohit verma mohit89m...@gmail.com wrote:
example:
array 1 :: 1 2 3 4 5 6 7 8 9 10 15
array 2:: 23 34 56 13 15 57 432 348
On Sun, Aug 14, 2011 at 6:44 PM, shady sinv...@gmail.com wrote
given two arrays : with all distinct elements but one element in common.
Find the common element in optimal time.
--
*MOHIT VERMA*
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send email
example:
array 1 :: 1 2 3 4 5 6 7 8 9 10 15
array 2:: 23 34 56 13 15 57 432 348
On Sun, Aug 14, 2011 at 6:44 PM, shady sinv...@gmail.com wrote:
meaning ? what is a common element ? example ???
On Sun, Aug 14, 2011 at 6:37 PM, mohit verma mohit89m...@gmail.comwrote
--
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
there are 5 possibilities ..5th one is_12_..other as specified by
ankit...
t(1) =2 (it can directly jump to anathor bank)
t(2) =3 ( _2_,_1_,_12_)
t(3) =5...
thats how fibonnaci goes on plz correct if wrong...
--
You received this message because you are subscribed to the Google
this group, send email to
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/algogeeks?hl=en.
--
*MOHIT VERMA*
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group
.
--
*MOHIT VERMA*
--
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
Hey guys,
can anyone post some written and interview question asked by Novell?
--
*MOHIT VERMA*
--
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
10
4 5
2 7 6 11
1 39 8 12 13 14 15
i think we should first find the parent of the particular node ..then apply
the concept as told by Brijesh on it
p =parent(q);
r = parent(p);
@muthu raj:
it will also come out ,when loop condition will not be statisfied.i.e when
'p' is not the right child of its parent...in such a case it will not reach
root ..
in the ex given by u it will stop at 4 .
--
You received this message because you are subscribed to the Google Groups
?
--
*MOHIT VERMA*
--
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
to
an integer, which I think can be changed.
See if the code I suggested still does the same as your version...
On 8 August 2011 19:53, mohit verma mohit89m...@gmail.com wrote:
In c++
int d=1;
const int *const ptr = d; means ptr is const ptr to const object .So
neither ptr nor d can be changed
got it.. thanks guys
On Mon, Aug 8, 2011 at 8:00 PM, mohit verma mohit89m...@gmail.com wrote:
No .. in this case it flags error.
On Mon, Aug 8, 2011 at 7:58 PM, Dipankar Patro dip10c...@gmail.comwrote:
does the answer still remain same if you do the following:
const int d=1;
const int
1 - 100 of 195 matches
Mail list logo