bit to all the remaining positions
making it 0x (-1). You can confirm it while setting bit.bit1 to 0
-Dinesh Bansal
On Tue, Aug 9, 2011 at 12:24 PM, Rohit Srivastava wrote:
> #include
> #include
>
> int main()
> {
> struct value
> {
> int bit1
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 th
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.
>
--
Dinesh Bansal
The Law of Win say
ail 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.
>
>
--
Dinesh Bansal
The Law of Win says, "Let's not
uv
> Saurabh Badhai
>
> --
> 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.
;
>
> --
> Regards
> Saurabh
>
> --
> 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
>
never mind...thanks.
On Wed, Jul 13, 2011 at 2:29 PM, dinesh bansal wrote:
> Can you explain how its working?
>
> On Wed, Jul 13, 2011 at 1:58 PM, Anika Jain
> wrote:
> > a better idea is use this:
> >
> > int a=9,b=4;
> > int sum=printf("
= ' ') NewWord = 1;
} else {
if(NewWord) {
push(ii);
NewWord = 0;
}
}
ii++;
}
/* Now print the words from stack */
while(1) {
ii = pop();
printf("%s ",(char *)&InStr[ii]);
s.google.com/group/algogeeks?hl=en.
>
> --
> 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
>
cause 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
>
) {
input[j] ^= ele;
}
}
}
for(i=0; i < size;i++)
printf("%c",input[i]);
}
--
Dinesh Bansal
The Law of Win says, "Let's not do it your way or my way; let's do it
the best way."
--
You received this messa
. Since
medium priority tasks does not need R, they can interrupt L. Now if H
also need the same resource R, it has to wait until L is done with it.
So H gets blocked. This is called priority inversion.
-Dinesh Bansal
On Mon, Jun 20, 2011 at 10:35 PM, ricky wrote:
> In priority inversion the h
Thanks Guys I got it.
@balaji... you are right.. it will work just fine.
-Dinesh Bansal
On Fri, Jun 10, 2011 at 10:22 PM, Vetri Balaji wrote:
> int flip(int j,int k,int n)
> {
> int t1=(1< int t2=(1< t1=t2^t1;
> return n^t1;
> }
> correct me if im wrong
>
>
How do you reverse the bits between j to k in a 32 bit integer.
For e.g.:
n = 11100011; j = 2 and k = 5
output: 1101 (bits from 2 to 5 are reversed.)
n = 11010110; j = 1 and k = 5
output: 11101000
O(1) method is preferred.
Thanks,
--
Dinesh Bansal
The Law of Win says, "Let's
Medium | 5
Low | 2
Calculate total weight = 8*4+5*2+2*1 = 44
Now assign resource based on priority:
Priority = high, Resource = 4 * 100 / 44
Priority = medium, Resource = 2 * 100 / 44
Priority= low, Resource = 1 * 100 / 44
Hope it makes more clear.
-Dinesh Bansal
On Thu
egroups.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.
>
>
--
Dinesh Bansal
The Law of Win says, "Let's not do it your way or my way
type
>
>
> On Tue, Feb 15, 2011 at 12:36 PM, rahul wrote:
>
>> char *start is const char *start, pointer to const char, u can't
>> derefernce it and change it.
>> take a char start[256].try this.
>>
>>
>> On Tue, Feb 15, 2011 at 12:31 PM, dine
0; ((j+1) < new_len2); i+=2,j+=2)
{
start[i] = hex_buf[j];
start[i+1] = hex_buf[j+1];
}
}
Thanks,
--
Dinesh Bansal
The Law of Win says, "Let's not do it your way or my way; let's do it the
best way."
--
You received this message because you are
ail 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.
>
>
--
Dinesh Bansal
The Law of Win says, "Let's not
to this group, send email to algoge...@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.
>
--
Dinesh Bansal
The Law of Win says, &q
s.google.com/group/algogeeks?hl=en.
>
Hi juver++,
Ya.. recurrsive function call was a good idea.. thanks.
Regrading second question, there are two SLLs L1 and L2, at some node both
lists nodes point to the same node and create single linked list.
hope I am clear.
--
Dinesh Bansal
The Law of W
Hi Guys,
There are some questions asked to me:
1. How do you print the SLL in reverse order. List should not be changed.
2. Two SLLs are merging at one point, how can you find out efficiently.
Thanks
--
Dinesh Bansal
The Law of Win says, "Let's not do it your way or my way; let
ttp://groups.google.com/group/algogeeks?hl=en.
>
>
Use External sorting.
Divide the file data into smaller chunks. Sort the chunks of data one at a
time and save them back to file.
Then get top values from the chunks and sort them again till you get top 10
values.
--
Dinesh Bansal
The Law
If we rewrite question in terms of Probability, call to foo2() depends on
two events:
1. (E1) A > B, probablity 75%.
2. (E2) C < D, again probability 75%.
Probability (E) = Prob(E1) * Prob(E2) = 75/100 * 75/100 * 5000 = 2812.50
times.
Correct me if wrong.
- Dinesh Bansal
On Wed, Dec 15, 2
oup, send email to algoge...@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.
>
>
--
Dinesh Bansal
The Law of Win says,
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.
>
>
--
Dinesh Bansal
The Law of Win says, "Let's not do it your way or my way; let's do it the
best wa
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com
> .
> For
thm Geeks" group.
> To post to this group, send email to algoge...@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.
>
--
Dinesh
; algogeeks+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>
--
Dinesh Bansal
The Law of Win says, "Let's not do it your way or my way; let's do it the
best way."
--
You received thi
..@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.
>
>
--
Dinesh Bansal
The Law of Win says, "Let's not do it y
On Mon, Dec 21, 2009 at 6:47 PM, Linus Probert wrote:
> If the numbers are unique you could use a bitmap-sort this way you could
> easily read just parts of the file at a time.
>
> If they aren't unique it gets a bit trickier.
>
> /L
>
> dinesh bansal wrote:
> &g
ntire file contents
in main memory. Can somebody help me with algorithm or pseudo code?
Thanks in advance.
--
Dinesh Bansal
The Law of Win says, "Let's not do it your way or my way; let's do it the
best way."
--
You received this message because you are subscribed to the Google
the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google
n BFS manner and
store the nodes in an array at their specific locations. At the end, display
the nodes from the array.
Thanks,
--
Dinesh Bansal
The Law of Win says, "Let's not do it your way or my way; let's do it the
best way."
--
You received this message because you a
ore options, visit this group at
> >> http://groups.google.com/group/algogeeks?hl=en.
> >>
> >>
> >
> > --
> >
> > You received this message because you are subscribed to the Google Groups
> > "Algorithm Geeks" group.
> > To post
Hi All,
I got a question:
I have 25 horses and I need to find the 1st, 2nd and 3rd fastest among all.
I have a race course of 5 tracks. That means I can run 5 horses at a time.
What are the minimum number of races required for this.
Thanks,
--
Dinesh Bansal
The Law of Win says, "Let
over a duplicate by adding an element to the set that is
> already there (O(n) expected time to build the set).
>
> Ralph Boland
> >
>
--
Dinesh Bansal
The Law of Win says, "Let's not do it your way or my way; let's do it the
best way."
--~--~-~--~
Hi All,
Can anyone provide me a good program/algorithm to find all anagrams for a
given word.
Input string should be of variable length (max 26 char). Just printing is
not enough,
we need to store the output to a file or static memory somewhere.
Thanks in advance.
--
Dinesh Bansal
The Law of
38 matches
Mail list logo