Please suggest logm+logn aproach...
can be easily done in o(k)
How to do in logm +logn
plz suggest algo
--
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 alg
t;
> int min = 0;
> int max = sizeA;
> const int medianPos = (sizeA + sizeB) / 2;
> while(max >= min)
> {
> i = (min + max) / 2;
> j = medianPos-i;
> if (B[j] > A[i]) min = i+1;
> else if (B[j+1] < A[i]) max = i-1;
> else break;
> }
>
>
> wrote:
>
>> This seems to be Coin Change problem. Just google that.
>>
>>
>> On Tue, May 28, 2013 at 12:42 AM, Adolfo Ccanto wrote:
>>
>>> Can you write the constraints for this problem?
>>> thanks.
>>> Adolfo
>>>
>>>
Can i implement by trie which is having structure as 9 pointers for 9
digits..like if it comes 4663...i will make a path 4663 from root to leaf
and in end i will have a linked list to store dataany more optimized
solution anyone having???plz suggest
On Thu, May 30, 2013 at 2:37 AM, rahul
Can anybody explain me how juggling algo works for array rotation ???Whats
the logic behind this?
--
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+un
wat exaclty the question is.
We have to make a tire with filter or we have a trie(whole dictionary) and
we have to check filter out the elements.
plz explain question
On Wed, May 29, 2013 at 7:55 PM, Don wrote:
> There has to be some way to know that a node is the end of a word, and
> to k
how to implement with trie.???is trie the best way..plz provide me raw algo
to start with,
--
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.
@don u r searching in a previously built trie with the given filter...then
wat is this add fxn doing?correct me if m getting u wrng
On Wednesday, May 29, 2013, avinesh saini wrote:
> Thank you Don, I was also trying in similar way. But here I'm confused
how you are storing the traversed words. Are
@don..you are counting in an integer only...correct if wrng?
On Wed, May 22, 2013 at 7:28 PM, Don wrote:
> My program works with any numbers.
> Don
>
> On May 22, 3:45 am, Pramida Tumma wrote:
> > This above program works only if the array contains consecutive numbers
> > starting from 1 to n.
Generate all possible combinations (of r elements) inside an array of size
N
E.g. arr [] = {2,8,14} All possible combinations of r=2 will be {2,8},
{8,14}, {14,2}
Asked in adobe
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To unsubscribe
@don...i got it...its complexity is logn..how?
On Thu, May 23, 2013 at 11:10 AM, rahul sharma wrote:
> @don..you are counting in an integer only...correct if wrng?
>
>
> On Wed, May 22, 2013 at 7:28 PM, Don wrote:
>
>> My program works with any numbers.
>> D
gt; On Mon, May 13, 2013 at 1:42 AM, rahul sharma wrote:
>
>> [image: BST_LCA]
>> what should be ancestor of 12 and 14.it should be 12 or
>> 14...if 12 then for 20 and 22 also it is 20...if 12 ans 14 has
>> ancestor as 8 then for 20 and 22 it is NULL
guys ..i got solution here
http://www.geeksforgeeks.org/program-to-count-number-of-set-bits-in-an-big-array/
plz tell how its complexity is logn.
On Fri, May 17, 2013 at 6:55 PM, Don wrote:
> Counting the set bits in one integer is not the problem which was
> asked.
> However, I think that som
following is code from geeks for geeks.
Please tell how the complexity of this in n*n!
n*n! times loop will be executed and then wat about the statements in
loop??
reference:-
http://www.geeksforgeeks.org/lexicographic-permutations-of-string/(second
method)
void reverse(char str[], int l, int
and how this is working
void init()
{
bitCount[0] = 0;
for(int i = 1; i < 65536; ++i) bitCount[i] = bitCount[i/2] + (i&1);
}
it is working fine..but plz tell the logic behind this
On Thu, May 23, 2013 at 11:12 AM, rahul sharma wrote:
>
> @don...i got it...its complexity is logn..
@pramidathat can be done in 0(n)..lets say int takes 4 bytes
i will make and array of first 256 numbers ...
while finding for inte i will take a char pointer pointing to first byte
and then using array of 256 int i will count in that byte and increent
array and count in it.and so on...acces
Minimum of coins to sum s
--
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.
ect me if i am wrong?
> Thanks,
> Tushar Patil.
>
>
>
> On Sun, Apr 21, 2013 at 10:26 PM, rahul sharma wrote:
>
>> int leastCommanAncestor(struct node* root, int n1, int n2)
>> {
>> if(root==NULL)
>> return -1;
>> if(root->data>n1 &&a
unsigned snoob(unsigned x) {
unsigned smallest, ripple, ones;
// x = xxx0
smallest = x & -x; // 0001
ripple = x + smallest; // xxx1
ones = x ^ ripple; // 0001
ones = (ones >> 2)/smallest; // 0111
return ripple | ones; // xxx1 0111
}
please ex
I was searching for google questions and got this question.Use look up to
do it in bext way
What is best time complexity for this..
plz post algo too
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To unsubscribe from this group and stop re
be selected.
> (3) Remaining 1 would be MCA.
>
>
> So ans would be (d)
>
> option (b) is not correct as it says that only 2 mba and only 1 mca are
> selected but the total no of selected candidates are 6.
>
> --
> Ashish
>
>
> On Fri, Apr 26, 2013 at 11:32 PM,
10 candidates appear for an interview and 6 selected.
2-M.A
2-MCA
4-BTECH
2-MBA.
If at least one MBA is selected then exactly 2 btech are selected and vice
versa.
Of six candidates,exactly one must be an MA cndidate
question:- which of the following statementsis definitely true:,if 2 btech
are sel
t; On Fri, Apr 26, 2013 at 3:11 AM, Don wrote:
>
>> The complexity is still O(ROWS*COLS) because each location in the
>> matrix will be visited once by the loop and once by DFS. Once a
>> location has been visited by DFS, it is marked as visited and can't be
>> visited
What will be complexity if all elements in matrix are 1..
when first dfs will call then all matrix will be scanned setting each
element to visited...
then again loop contiues to scan all the elements..plz explain
On Thu, Apr 11, 2013 at 2:04 AM, rahul sharma wrote
@don..can u plz tell me how the complexity of this
http://www.geeksforgeeks.org/find-number-of-islands/ is ROW*COL?
On Thu, Apr 11, 2013 at 4:35 PM, rahul sharma wrote:
>
> M not getting matrix..is it adjacencyif simple 1 means connected
> components then first wehave 3 ones..then
IS this code correct?
float findMedianUtil( int A[], int N, int B[], int M )
{
// If the smaller array has only one element
if( N == 1 )
{
// Case 1: If the larger array also has one element, simply call MO2()
if( M == 1 )
return MO2( A[0], B[0] );
estor.
>
> It seems that common usage is that a node is its own ancestor; see, e.g.,
> http://en.wikipedia.org/wiki/Lowest_common_ancestor.
>
> Dave
>
> On Sunday, April 21, 2013 11:56:01 AM UTC-5, rahul sharma wrote:
>
>> int leastCommanAncestor(struct node* root, int n1,
int leastCommanAncestor(struct node* root, int n1, int n2)
{
if(root==NULL)
return -1;
if(root->data>n1 && root->data>n2)
return leastCommanAncestor(root->left,n1,n2);
else if(root->datadataright,n1,n2);
return root->data;
}
Does this code miss any case?N suppose if we have to find LCA of n
search the previous posts before posting
search for
[algogeeks] Amazon Interview Question
you will get this
--
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 a
Can anyone give me example using hash+linked list method ..although i got
dave method.but still...
On Tue, Apr 16, 2013 at 8:58 PM, Dave wrote:
> @Varun: Here is an algorithm using sorting only:
>
> 1. Append an index onto each number, so your example becomes {{4,0},
> {3,1}, {2,2}, etc.}
>
> 2
@don.can u plz explain with example.
On Wed, Feb 1, 2012 at 9:29 PM, Don wrote:
> Build a hashmap with the array value as a key mapping to a struct
> which contains the key, frequency, and location of first occurance.
> Then sort the hashed elements comparing first by frequency and
> breaking t
Suppose you are given a string IAMABOY
and a dictionary then divide it into I AM A BOY if it is possible to break
form as many dictionary words from a string giveM able to solve it..but
how if we are given a string like IXAFGMJAHBDSOXDY.
how can we form I AM A BOY..will be done in Opower(2,n)
in this there are permutation cycles which are used to do transpose.can
anybody tell me
nl = (ol x R) mod (N-1)
nl- new location
ol- old location
N-total elements
if i is current element then it will be placed at new location
next = (i*r)%size;
r- no. of rows
please explain how it works log
:
> islands are five as for each cell we assume all surrounding positions to
be connected... so if coordinates are (x,y) then it is connected to (x+1,
y), (x-1, y), (x+1, y+1), (x-1, y+1), (x+1, y-1), (x-1, y-1), (x, y-1), (x,
y+1
>
>
> On Thu, Apr 11, 2013 at 9:35 AM, rahul sharma
wrote:
&
lly, horizontally, or diagonally.
> So the five islands are
>
> 11000
> 01002
> 10022
> 0
> 30405
>
> Don
>
> On Apr 10, 4:34 pm, rahul sharma wrote:
>> {*1*,* 1*, 0, 0, 0},
>> {0, *1*, 0,
>
> On Apr 10, 4:19 pm, rahul sharma wrote:
>> isnt the complexity should be o(m*n*n) instead of (n*n*n) as m can be
>> greater than n..plz comment
>>
>> On Wed, Apr 10, 2013 at 10:11 PM, rahul sharma wrote:
>>
>>
>>
>>
>>
>>
>
{*1*,* 1*, 0, 0, 0},
{0, *1*, 0, 0, *1*},
{*1*, 0, 0, *1*, *1*},
{0, 0, 0, 0, 0},
{*1*, 0, *1*, 0, *1*}
Can anybody eplain how there are 5 islands in above matrix..thnx in advan
isnt the complexity should be o(m*n*n) instead of (n*n*n) as m can be
greater than n..plz comment
On Wed, Apr 10, 2013 at 10:11 PM, rahul sharma wrote:
>
> http://www.geeksforgeeks.org/dynamic-programming-set-27-max-sum-rectangle-in-a-2d-matrix/
>
> wat is complexity of this..
http://www.geeksforgeeks.org/dynamic-programming-set-27-max-sum-rectangle-in-a-2d-matrix/
wat is complexity of thisn3 or mn2
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving emails fr
M asking in case of DELETE from trie fxn
On Wed, Apr 10, 2013 at 9:15 PM, rahul sharma wrote:
> http://www.geeksforgeeks.org/trie-insert-and-search/
>
> Can any body tell me what is need of checking pcrawl!=0 int the
> return..cant we check only its value>0 to check whether
http://www.geeksforgeeks.org/trie-insert-and-search/
Can any body tell me what is need of checking pcrawl!=0 int the
return..cant we check only its value>0 to check whether its a leaf node
return (0 != pCrawl && pCrawl->value);
--
You received this message because you are subscribed to the Goog
If you have any other solution ..please post that...i thnik recursion is ok
with base case...we need to scan again after first iteration...??
On Wed, Apr 10, 2013 at 12:12 AM, rahul sharma wrote:
> i forgot to add base case..can add wen 2 elemnts are there then there sum
> is stored
times.
>
> However, I would suggest not using recursion. There is no reason to
> not do it iteratively. Your recursive solution has no base case so it
> will recurse until your computer runs out of stack space, at which
> point it will crash.
>
> Don
>
> On Apr 9, 2:29 pm, ra
A = {5, 3, 8, 9, 16}
After one iteration A = {3-5,8-3,9-8,16-9}={-2,5,1,7}
After second iteration A = {5-(-2),1-5,7-1} sum =7+(-4)+6=9
Given an array, return sum after n iterations
my sol/
void abc(int arr[],n)
{
for(i=0;ihttps://groups.google.com/groups/opt_out.
ote:
> "head" is not even declared, so I doubt that it would compile.
> I believe that you want to free head, not next.
>
>
> On Apr 9, 11:31 am, rahul sharma wrote:
> > Is the following code correct for linked list deletion or i need to copy
> > head in some tem. p
es nothing and leave the
>> heap in an invalid state.
>>
>> Comapring l and r child to find maximum/minimum is only needed in
prelocate
>> down, not in prelocate up.
>>
>>
>> 2013/3/24 rahul sharma
>>
>>> And also in heapify y we r not co
You mean one who can provide solutions to the pending questions or some
type of management of group like the type of posts and off topic??
On Wed, Mar 13, 2013 at 11:25 PM, shady wrote:
> Hi,
> Does anyone wants to be moderator ? We want someone who is actively
> participating in discussions
On Thursday, March 14, 2013, rahul sharma wrote:
> Can anybody provide any link me to understand t9 implementation? I dnt
need code..I need how to implement t9 with trie with explanation..thnx in
advance
--
You received this message because you are subscribed to the Google Groups
"A
Can anybody provide me to understand t9 implementation? I dnt need code..I
need how to implement t9 with trie with explanation..thnx in advance
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To unsubscribe from this group and stop receiving
S->aAbB\bAaB\e
A->S
B->s
Find follow(A) and follow(B)???explanation required??thnx in advance
--
IF btree is of order n,then what is min nuber of values at each node
Is it floor(n/2)
a
I read if oreder is 5 then min values in each node is 2...SO is it
floor(n/2)
--
HI
please explain the following question no: 2 on below link as i am not able
to copy it.
http://www.geeksforgeeks.org/database-management-system-set-3/
--
st occur" is asked my answer is option C
>
>
> On Sun, Dec 16, 2012 at 11:39 PM, marti wrote:
>
>> Yes I feel (e) is the right option.
>>
>>
>> On Sunday, December 16, 2012 11:18:57 PM UTC+5:30, rahul sharma wrote:
>>>
>>> A causes B or C, but
s of *the* book The C Programming Language by Dennis Ritchie:
>> There must be only one definition of an external variable among all the
>> files *that make up the*
>> *source program*; other files may contain extern declarations to access
>> it. (There may also be
>> extern declarat
; }
>> // end of file2.c
>>
>> compile both file together
>> as
>> rahul@rahul:~gcc file1.c file2.c
>> rahul@rahul:~./a.out
>> you will get the required output
>>
>>
>>
>>
>>
>> On Fri, Nov 16, 2012 at 8:27 AM, Neera
ndian Institute of Technology Roorkee
> Contact No. : +91 9897073730
>
>
>
> On Thu, Nov 15, 2012 at 9:10 PM, rahul sharma wrote:
>
>> but how can i use extern..if i simply declare a variable in file1 as int
>> j and try to use in file2 with extern then it shows that j nit de
t()
> {
> ++i;
> printf("%d\n",i);
> //printf("%d",j); // since no defintion provided so getting error
> other();
> }
>
> file2.c
>
>
> extern int i;
> void other()
> {
> ++i;
> printf("%d\n",i);
> }
>
> if you
following using exor
http://www.geeksforgeeks.org/archives/18324
following is tricky
http://www.geeksforgeeks.org/archives/22080
On Wed, Nov 7, 2012 at 11:36 AM, Rahul Kumar Patle <
patlerahulku...@gmail.com> wrote:
> you can use bit wise addition.. using xor , and , or and shift op
> erations..
dude n for build tree and n in this for finding maximun??so n*(n/2)=o(n^2)
On Mon, Nov 5, 2012 at 8:54 PM, shady wrote:
> Here the time complexity of the solution should be O(n * log(n))
> http://www.geeksforgeeks.org/archives/21781
>
> --
> You received this message because you are subscrib
ut as *cout << test* will take precedence, there is
> no point of putting a ternary operator there, unless you use braces, of
> course.
>
>
> In teh second case however, reason given is valid:
> i.e. return type of ternary operator is determined by "A String" and
You are given two 32-bit numbers, N and M, and two bit positions, i and j.
Write a method to set all bits between i and j in N equal to M (e.g., M
becomes a substring of N located at i and starting at j).
EXAMPLE:
Input: N = 100, M = 10101, i = 2, j = 6
Output: N = 10001010100
Following is
How actually to use extern
suppose in file 1 i write code..(test_new.c)
#include
#include
int interest_rate =5;
int main()
{
int test = 0;
int t=5;
// cout<
#include"test_new.c"
extern int interest_rate;
void fun()
{
interest_rate=6;
}
it works..
now if i make interest_rate as stati
le loop in the above code?
>>>>
>>>> I understand that the for loop implies O(n),does the log n in the O(n
>>>> log n) comes from the while loop?
>>>> What if there where two while loops in the for loop separately?
>>>>
>>&g
plz read carefully
On Wed, Oct 31, 2012 at 10:18 AM, Tamanna Afroze wrote:
> sorry for my last post, i didn't look carefully at the code. I think
> without bracket the ternary expression is incomplete, that's why; first
> code doesn't compile correctly.
>
>
>
> On Wed, Oct 31, 2012 at 9:51 AM, Ta
i thnik this is the solution...
http://www.geeksforgeeks.org/archives/9755
On Wed, Oct 31, 2012 at 2:20 AM, Don wrote:
> We can modify the array. The algorithm should work even if we use
> unsigned integers and N is the largest unsigned integer.
>
> Don
>
> On Oct 30, 4:4
Can we modify the array???we can make index we visit as negative and then
if any one already containing -ve..then its repeating
On Wed, Oct 31, 2012 at 1:40 AM, Don wrote:
> Does your algorithm work if N=4 and the array is {1,1,2,2}.
>
> Don
>
> On Oct 30, 2:32 pm, arumuga abinesh wrote:
> > if
..before and after the swap then
>> you should see that after swap p will be holding address of x and
>> q will be holding address of a..that it
>>
>> On 10/29/12, rahul sharma wrote:
>> > I have taken form book...i am writing exact code
>> >
gt; http://gcc.gnu.org/onlinedocs/cpp/Argument-Prescan.html#Argument-Prescan
>
>
>
>
> On Sun, Oct 28, 2012 at 3:28 PM, rahul sharma wrote:
>
>> And when char *opername=str(oper);
>>
>> then o/p is operwhy behaviour is diff. in 2 cases
>>
>> O
s
> you would be assigning nowhere.
>
> On 27 October 2012 20:09, rahul sharma wrote:
>
>> But y post returns temp. object
>>
>>
>> On Fri, Oct 26, 2012 at 8:18 PM, Saurabh Kumar wrote:
>>
>>> i++: Post increment can't be a lvalue because
void(*f)(void(*)(int*,void **),int(*)(void**,int*));
f is a fxn pointer to fxn which takes 2 args and teturn nothing
2 arguments are
1. pointer to function which returns nothing and takes 2 args one pointer
to int and pointer to pointer to void
2. pointer to fxn returning int and takes 2 args a
#include
#include
int func(int);
int main(int count,char *argv[])
{
typedef int (*pFunc) (int);
pFunc=func;
getchar();
}
Y itz not compiling?
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to al
to save the address of x and y in temp
> pointers i.e
>
>int *p.*q;
> p=&x;
> q=&y;
> int t;
> t=*p;
> *p=*q;
> *q=t;
> now you can convert it into macro.
>
> On 10/29/12, rahul sharma wrote:
>
ut not swapping
two pointerssplz comment
> On Sun, Oct 28, 2012 at 9:16 PM, rahul sharma wrote:
>
>> its now doing swapping of pointers...plz explain
>>
>>
>> On Sun, Oct 28, 2012 at 8:08 PM, atul anand wrote:
>>
>>> it should swap
>>&
Sun, Oct 28, 2012 at 9:40 PM, rahul sharma wrote:
> According to wiki http://en.wikipedia.org/wiki/Least_common_ancestor
>
> n1 is parent of n2 then n1 is lcabut according to above algo return
> -1..i have taken it from(http://www.geeksforgeeks.org/archives/1029)
>
> plz tell
And when char *opername=str(oper);
then o/p is operwhy behaviour is diff. in 2 cases
On Sun, Oct 28, 2012 at 2:53 PM, rahul sharma wrote:
> #include
> #include str(x) #x
> #define Xstr(x) str(x)
> #define oper multiply
>
>
> int main()
> {
> char *opername=Xstr(op
#include
#include str(x) #x
#define Xstr(x) str(x)
#define oper multiply
int main()
{
char *opername=Xstr(oper);
printf("%s",opername);
}
so firstly Xstr is expanded to str(oper)
then str(oper) is expanded to #oper now i have read that
If, however, a parameter name is preceded by a # in the
Why the following code is not able to swap two macros???although it is
easily swapping 2 variables
#include
#define swap(a,b,c) c t;t=a,a=b,b=t
int main
int x=10,y=20;
int *p,*q;
swap(x,y,int);
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geek
think the output should be :
>>
>> text1text2
>> text2
>>
>>
>>
>>
>>
>> On Sat, Oct 27, 2012 at 2:22 PM, rahul sharma wrote:
>>
>>> int main() {
>>> printf("text1");
>>> fork();
>>>
@payalplz explain how to slect 3 spaces for a.b.c out of 6.
we need to put them in orderso look my aboyve post and plz comment
On Sat, Oct 27, 2012 at 8:14 PM, rahul sharma wrote:
> plz help mei am thinking this the following way..
>
> we need to find no. of permutaions
sion and abc in
>> other)
>>
>> You can view this problem as writing all permutations of strings of 3R's
>> and 3U's (for RIGHT movement and UP movement) RRRUUU which will take you to
>> the top right most corner.
>> All possible arrangements = (3+3)! / (
mp; 1;
> >> *a++ *a is Post incremented (a is now 1 but return value is 0)
> >> *0 && 1* = 0 (which gets assigned to j)
> Hence, j = 0, a = 1
>
> On 26 October 2012 18:54, rahul sharma wrote:
>
>> Guys plz tell that postincremented variable is incremented
used only as a rvalue.
> ++i: whereas, in Pre-increment value gets incremented and the same
> location is returned back to you, hence can be used as lvalue in an
> expression.(C++ allows this)
> Both can be used as rvalues though.
>
> On 26 October 2012 18:54, rahul sharma wrote:
27;s
> and 3U's (for RIGHT movement and UP movement) RRRUUU which will take you to
> the top right most corner.
> All possible arrangements = (3+3)! / (3! * 3!)
> In general: (m+n)! / (m! * n!) for a mxn grid.
>
>
> On 27 October 2012 11:05, rahul sharma wrote:
>
>>
should i take it how many ways are there to reach from start to the top
right destination...x,y,z,a,b,c, are i/p statexyzabc one stringabc
xyz is another...if m ryt then is dere any formulla to calute or we have to
do it manuall
On Sat, Oct 27, 2012 at 11:02 AM, rahul sharma wrote
can u please elaborate...i am not able to understand the figure..plz
explainit would be of great help
On Sat, Oct 27, 2012 at 5:57 AM, payal gupta wrote:
> should be 6C3 or 20 perhaps.
>
> On Sat, Oct 27, 2012 at 3:29 AM, rahul sharma wrote:
>
>> Finite state automata accp
for k=1 to n
{
j=k;
while(j>0)
j=j/2;
}
the complexity is big o is o(nlogn)
am i ryt
--
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 ema
There is question asked like
O/p of following in C(32 bit OS)
#include
#include
using namespace std;
bool IsEqual(char * a)
{
printf("abc");
return true;
}
int main()
{
char str[30];
printf("%d",sizeof(sizeof(IsEqual(str;
getchar();
return 0;
}
I run with .cppi
why pre inc. is l value and post is r value..please explain
--
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...@
Guys plz tell that postincremented variable is incremented after sequence
or after ;
as we have && || comma and ; as sequence point
so say we have
int i=10;
int j=(i++,i++);
firstly i++ goes and as comma comes so ++ post inc. takes place and take to
11 ..now when next time the postincremented is
Plz give a program for this...thnx
--
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 mor
Please dont reply to thi post..wrng questionsry for that
On Fri, Oct 26, 2012 at 2:31 AM, rahul sharma wrote:
> address of each byte is printed...each byte is 32 bit long...so 32/4=8 hex
> for each row...but how these are separated with %.2x tin group of
> 2's%.2x means min
ed...print start[i]still how these
are able to grouped??
On Fri, Oct 26, 2012 at 1:53 AM, rahul sharma wrote:
> As per o/p below:
> 00 00 80 3f
> 01 00 00 00
> 44 ff 28 00
> 01 00 00 00
>
> first byte address is first row.
> second byte address is second row.
> third b
milarly, for pointer:
>> char pointer reads 1 Byte at a time. It read 4Bytes in total i.e. 32
>> bits. Hence, you are working on a 32 bit machine. (as pointer has value:
>> *44 ff 28 00, *address of i)*.*
>> *
>> *
>> *
>> *
>> PS: This is an algorithm gr
tion when ,when
> compiler tried to link with the memory of int arr[10] it could nt find it ,
> as u have declraed it to be integer type pointer , and in file 1 it could
> find integer pointer .
>
> On Wed, Oct 24, 2012 at 11:06 PM, rahul sharma wrote:
>
>> int arr[10] // in fyl
I think it is overwritng old values when child end..parent overwrite old
value with new..m i ryt?
On Thu, Oct 25, 2012 at 3:00 AM, rahul sharma wrote:
> I wana ask that when we pass array by recursion then as we know formal
> parameters are passed by value and array by base address/point
int arr[10] // in fyl 1
now in fyl 2
extern int *arr
void foo()
{
arr[0]=10;
}
what kind of problem can be there?in what condition and y?
plz comment
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks" group.
To post to this group, send email to algo
can nyone provide me dummy code of how exactly to use extern in c..
in dev environment
when i declare int i in one fyl
and try use use with extern int i in another then it doesnt compile..plz
coment
On Wed, Oct 24, 2012 at 9:58 PM, rahul sharma wrote:
> Then why its not running?
>
>
gt; declaration/definition of C functions, it is present there. For example,
> when we write.
>
> int foo(int arg1, char arg2);
>
> There’s an extern present in the beginning which is hidden and the
> compiler treats it as below.
>
> extern int foo(int arg1, char arg2);
>
for this shall we process all items and parallely calculate first and
second max.
or tournament methos i best for thsi..
if tournament method is best can anybody provide me with code with
tournament method to find second smallest..
--
You received this message because you are subscribed to th
Pleaase reply with sol as asp
Fille 1:
#include
extern int i;
extern int j;
void next(void);
int main()
{
++i;
printf("%d",i);
next();
getchar();
}
int i=3;
void next()
{
++i;
printf("%d",i);
printf("%d",j);
other();
}
File 2:
extern int i;
void other()
{
++i;
printf
1 - 100 of 377 matches
Mail list logo