[algogeeks] Re: parameters to non-const and const reference concept-C++

2012-12-23 Thread Lucifer
@phoenix The reason is not an implication of using references. If u are passing emptyvec() as an argument then the vector returned by emptyvec() is a temp object ( as its not being assigned to a obj var created by the programmer), which means that the user/programmer shouldn't be able to

[algogeeks] Re: Implement Malloc and Free

2012-12-23 Thread Lucifer
@arun.. If u have a copy of the Ç prog lang by dennis ritchie, then u can checkout for a simplified implemented version of malloc and free provided under section 8.7 (storage allocator)... It uses the same concepts as mentioned by @Don. On Wednesday, 19 December 2012 22:02:06 UTC+5:30, Anuj

Re: [algogeeks] Re: parameters to non-const and const reference concept-C++

2012-12-23 Thread Arun Vishwanathan
@Lucifer: Thanks a lot for the explanation On Sun, Dec 23, 2012 at 4:51 AM, Lucifer sourabhd2...@gmail.com wrote: @phoenix The reason is not an implication of using references. If u are passing emptyvec() as an argument then the vector returned by emptyvec() is a temp object ( as its not

Re: [algogeeks] Regex tester

2012-12-23 Thread saurabh singh
If you need to implement this for some project then python and java have a very nice library Saurabh Singh B.Tech (Computer Science) MNNIT blog:geekinessthecoolway.blogspot.com On Sun, Dec 23, 2012 at 7:48 PM, shady sinv...@gmail.com wrote:

Re: [algogeeks] Regex tester

2012-12-23 Thread shady
that's the point, Have to implement it from scratch... otherwise java has regex and matcher, pattern to solve it... On Sun, Dec 23, 2012 at 10:28 PM, saurabh singh saurab...@gmail.com wrote: If you need to implement this for some project then python and java have a very nice library

Re: [algogeeks] Regex tester

2012-12-23 Thread Prem Krishna Chettri
Well I can tell you Something about design pattern to solve this case.. What I mean is by using The State Machine Design Pattern, Anyone can solve this. but Ofcourse it is complicated. On Sun, Dec 23, 2012 at 11:01 PM, shady sinv...@gmail.com wrote: that's the point, Have to

Re: [algogeeks] Re: Implement Malloc and Free

2012-12-23 Thread Tasvinder Singh
Hi Anuj, This may help. http://lambda.uta.edu/cse5317/notes/node45.html On Sun, Dec 23, 2012 at 3:25 PM, Lucifer sourabhd2...@gmail.com wrote: @arun.. If u have a copy of the Ç prog lang by dennis ritchie, then u can checkout for a simplified implemented version of malloc and free

[algogeeks] Re: Array Problem

2012-12-23 Thread Lucifer
@arun.. Couple of questions need to be clarified : 1) Are all the numbers given in the unsorted array +ive integers.. ? 2) By 2 equal arrays do you mean that both the arrays should be of size N/2 (where N is even) .. ? If the above assumptions are true then we can use the following recurrence