You can use mutex instead of semaphores if you need to execute only one
case at a time.
FROM,
V.VIGNESH.
M.Sc Theoretical Computer Science.
PSG College of Technology
On 25 November 2012 22:37, jagannath wrote:
> Folks, I have one pthread question.I know that its not the right place but
> i t
Hai i tried the same in TC compiler. i got the output as 17. I guess the
output should be 17 as explained by Prateek Jain
On 30 May 2012 02:26, rahul ranjan wrote:
> it first calculates from right to left and then performs addition
> so after a++ its still 4(with a promise to increment
Hai
Can you brief about the rest of the cases?
On 4 May 2012 01:56, Umer Farooq wrote:
> Hi friends!
>
> I hope that you are doing really good these days.
>
> I submitted my code on interviewstreet.com
>
> The problem statement can be found on
> https://www.interviewstreet.com/challenges/dashbo
FROM,
V.VIGNESH.
On 20 March 2012 17:58, Dheeraj Sharma wrote:
> How to check if one binary tree is a sub tree of other?
> Any Solution other then bruteforce?
> Prototype
> bool check(node *t1,node *subtree)
>
> --
> Sent from my mobile device
>
> *Dheeraj Sharma*
>
> --
> You received this me
Dude plz post them here...
--
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 option
his group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>
--
Vignesh Radhakrishnan
--
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 f
It is sum and carry addition that we do by hand.
Take two numbers a , b
c = a XOR b gives the sum with out carry for all binary digits
x = a AND b gives the carry at all the places for all binary digits
We shift all carries of binary digits in the bit string to one place right.
ie. do right shift
;t think 1014 needs any special algorithm, if we've got an H x W
> matrix, then we've got (4H+4W-2) strings in which you must look, and you can
> do this with a greedy strategy.
>
> 2010/5/19 vignesh radhakrishnan
>
>> I'm trying to solve some string problems somewat
@Marcio, I get your algo now. So a substring match is also a match. I get
your approach. Thank you.
Any ideas for the second problem?
On 20 May 2010 10:45, vignesh radhakrishnan wrote:
> @Mario Your estimate of no. of strings, I guess doesn't consider strings of
> length less than
@aarthi, Its seems like ur worried only about frequency, not the
sorting. If its a count sort you're trying to explain,then it requires
huge space.. And i guess there is no O(n) sort except count sort,
which won't be a gr8 soln. for the original problem
Regards,
Vignesh
On May 1
I'm trying to solve some string problems somewat efficiently. Can someone
tell me what would be efficient DS for solving these problems
http://acm.jlu.edu.cn/joj/showproblem.php?pid=1014
http://acm.jlu.edu.cn/joj/showproblem.php?pid=1873
Thanks,
Regards,
Vignesh
--
There are two kinds of p
This is for kth largest. Change it for kth smallest
In fact, this problem is amenable to something very similar to binary
search. Suppose my arrays are A and B. The idea is to keep track of two
indices, a (for A) and b (for B), such that a + b = k - 1 (it's very
important to maintain this invarian
do bfs.
On 13 May 2010 09:18, vinayan c wrote:
> Something like this
>1
>2 3
> 4 5 67
>
>
> 1
> |
> 2->3
> |
> 4->5->6->7
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> You received this messa
@siddharth and prasoon either design a very long integer library yourself,
or use gmp library in cpp or BigInteger Class in java.
Regards,
vignesh
On 3 May 2010 09:46, siddharth srivastava wrote:
> But is there any way to accomplish this without an array ? Even for 100!.
>
>
> On 2
I agree with abhijith. But given some very large x for which i would have to
find factorial.
I would either
(i) use gmp in cpp or BigInteger or java if its not a lab exercise or an
interview
(ii) use simple brute multiplication algorithm.
The second approach requires
(a) The no. of digits
@divya You're rite. Post a solution if you have one.
--
Regards,
Vignesh
On 2 May 2010 13:14, divya jain wrote:
> @Mohit
>
> according to ur algo if a[1], b[0] has sum greater than a[0],b[1]
> then i is incremented i is now 2 so for next iteration u ll compare a[2]
> b[
ther brute force it with a
program or design an back track solution.
regards,
vignesh
On 7 April 2010 12:20, «« ÄÑÜJ »» wrote:
> Can any one help me with this problem
>
>
> Its a divide and conquer problem where, there are n teams and each
> team plays each opponent only once. An
Thank you
On 4 March 2010 19:54, Anil Kishore wrote:
> Refer to the post here:
>
> http://forums.topcoder.com/?module=Thread&threadID=666810&start=0
>
> - AK
>
>
> On Thu, Mar 4, 2010 at 7:40 PM, B |_ /\ C |<--D ! /\ /\/\ O /\| D <
> patidarc...@gmail.com> wrote:
>
>> that last one can be done f
What about a ternary Search tree?
On 4 March 2010 16:21, Umer Farooq wrote:
> I can't get how will u manipulate the trie DS. u'll have to look back and
> see if the word already exists in the list. this will be an extra overhead.
>
> I have thought of another algorithm. Here is an abstract expla
The unordered pair will be a subset of cartesian product. What is the
significance of it?
On 8 February 2010 21:18, pinco1984 wrote:
> Hi all,
>
> I have came across a problem and I am not aware if there is such a
> thing in set theory and if so what is it called.
>
> Mainly I have several sets
20 matches
Mail list logo