roup and stop receiving emails from it, send an
> email to algogeeks+unsubscr...@googlegroups.com.
>
--
-Saurabh Paliwal
B-Tech. Comp. Science and Engg.
IIT ROORKEE
--
You received this message because you are subscribed to the Google Groups
"Algorithm Geeks&quo
4 -11 3 4 8}
>
> You have to print {from index, to last index} so for above example {0,
> 3}; {0,8}; {7,8} is the answer
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To unsubscribe from this group and
least one of them to move forward).
>>
>> eg :-
>>
>> 10 , 20 , 30, -10 , -50 , 40 , -50, -1, -3
>>
>> Output : 10+20+30-10+40-1 = 89
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
"Algorithm Geeks"
from it, send an
email to algogeeks+unsubscr...@googlegroups.com.
--
-Saurabh Paliwal
B-Tech. Comp. Science and Engg.
IIT ROORKEE
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To unsubscribe from this group and stop
, it did not work. But i think the brute force solution is possible
in O(n^3) solution. We have O(n^2) combination of end points. we can check
for the maximum possible even length palin string in O(n). So that will
give O(n^3). Anyone has solution about O(n^2)?
On 5 June 2014 22:25, Saurabh Paliwal
Ok! So I guess now we are talkng my solution. What i do is maintain two
pointers i and j, i is the end of the first string and j is the beginning
of the second. If both the character match, I calculate the answer for
pointers i-1,j+1 and add 1 to the answer for i,j. If they don't match, I
simply
by memoization.
On Thu, Jun 5, 2014 at 11:37 PM, Saurabh Paliwal
saurabh.paliwa...@gmail.com wrote:
Ok! So I guess now we are talkng my solution. What i do is maintain two
pointers i and j, i is the end of the first string and j is the beginning
of the second. If both the character match, I
is the answer
So time complexity = space complexity = O(n^2).
Correct me if i am wrong
On 5 June 2014 23:44, Saurabh Paliwal saurabh.paliwa...@gmail.com wrote:
And now I get what you meant when you said palindrome. You should have
explained that if that was not exact palindrome
So yes
Ws
On 27 Jan 2014 17:02, saurabh singh saurab...@gmail.com wrote:
^ No its not invalid. It just represents an equation with infinitely many
correct solutions depending on the domain of x.
Saurabh Singh
B.Tech (Computer Science)
MNNIT
blog:geekinessthecoolway.blogspot.com
On Mon, Jan 27,
care that 3 adjacent are
colored
different.
could you please clarify my doubt.
On Thu, Dec 26, 2013 at 5:25 PM, Saurabh Paliwal
saurabh.paliwa...@gmail.com wrote:
@atul anand :- no, we need not use all the colors.
@kumar raja :- sorry dude for replying this late. Continuing
.
To unsubscribe from this group and stop receiving emails from it, send an
email to algogeeks+unsubscr...@googlegroups.com.
--
-Saurabh Paliwal
B-Tech. Comp. Science and Engg.
IIT ROORKEE
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
, kumar raja rajkumar.cs...@gmail.com wrote:
Saurabh your solutions seems right , but can u explain me how did u
arrive at the time and space complexity with some proof /pseudocode/
explanation?
On 15 December 2013 09:47, Saurabh Paliwal
saurabh.paliwa...@gmail.comwrote:
what is the issue
is minimized.
Regards,
Kumar Raja.
--
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.
--
-Saurabh Paliwal
:
@pankaj : how can you maintain increasing sub-sequence using
heapyour soln is for finding finding K largest element in the
array...so it wont work.
On 10/24/13, Saurabh Paliwal saurabh.paliwa...@gmail.com wrote:
check for {5,2,3} and K = 2.
On Thu, Oct 24, 2013
.87fri...@gmail.comwrote:
@Saurabh Paliwal : yes
On 10/24/13, Saurabh Paliwal saurabh.paliwa...@gmail.com wrote:
Do you mean
*of all the increasing subsequences of length k in this array, find the
one
with maximum sum ?*
On Wed, Oct 23, 2013 at 10:52 PM, atul anand
atul.87fri
nothing
insert 55 (before inserting 50 delete the root of heap as count of heap ==
3), deleted root was - 5
so the output will be
{10,30,55}
and if k is 4
than
{5, 10, 30 , 55)
On Thu, Oct 24, 2013 at 6:20 PM, Saurabh Paliwal
saurabh.paliwa...@gmail.com wrote:
You must be mistaken
Geeks group.
To unsubscribe from this group and stop receiving emails from it, send an
email to algogeeks+unsubscr...@googlegroups.com.
--
-Saurabh Paliwal
B-Tech. Comp. Science and Engg.
IIT ROORKEE
--
You received this message because you are subscribed to the Google
I submitted the solution on hackerrank and got Accepted. There is a change
though, there may be more terms like Term (r+1)
but this can also be done using O(1).
Term (r+2) : (2*n+1 - (r+2)*k)/2 and so forth until numerator becomes zero.
You can use the same technique to get this sum as well.
,
Pankaj Kumar Joshi
--
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.
--
-Saurabh Paliwal
B-Tech. Comp
there is a minor correction in definition of r, actually r is the maximum
of all the numbers i such that *i*k-1=n.*
On Fri, Oct 18, 2013 at 2:38 PM, Saurabh Paliwal
saurabh.paliwa...@gmail.com wrote:
I think I have an O(1) solution to this problem.
I think we can use the idea of summing
Groups
Algorithm Geeks group.
To unsubscribe from this group and stop receiving emails from it, send an
email to algogeeks+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
-Saurabh Paliwal
B-Tech. Comp. Science and Engg
.
--
-Saurabh Paliwal
B-Tech. Comp. Science and Engg.
IIT ROORKEE
--
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
this group and stop receiving emails from it, send an
email to algogeeks+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
-Saurabh Paliwal
B-Tech. Comp. Science and Engg.
IIT ROORKEE
--
You received this message because you
emails from it, send an
email to algogeeks+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
-Saurabh Paliwal
B-Tech. Comp. Science and Engg.
IIT ROORKEE
--
You received this message because you are subscribed to the Google
...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
-Saurabh Paliwal
B-Tech. Comp. Science and Engg.
IIT ROORKEE
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To unsubscribe from
...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
-Saurabh Paliwal
B-Tech. Comp. Science and Engg.
IIT ROORKEE
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To unsubscribe from
the elements should be in sorted order.
For example:
for the above 2-D array, the output should be:
A [ ] = { 2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 15, 16, 21, 22, 35,
40, 58 }
--
--
--
-Saurabh Paliwal
B-Tech. Comp. Science and Engg.
IIT ROORKEE
--
Allahabad
B.Tech IT 4th Year
Mob no: +91 9454992196
E-mail: rit2009...@iiita.ac.in
jprakha...@gmail.com
--
--
-Saurabh Paliwal
B-Tech. Comp. Science and Engg.
IIT ROORKEE
--
.
--
--
-Saurabh Paliwal
B-Tech. Comp. Science and Engg.
IIT ROORKEE
--
29 matches
Mail list logo