this recurrence wont work..ignore
On Mon, Jun 4, 2012 at 8:55 AM, atul anand atul.87fri...@gmail.com wrote:
find cumulative sum row[0]
find cumulative sum of col[0]
after this following recurrence will solve the problem.
start from mat[1][1]
mat[i][j]=mat[i][j]+min( mat[i][j-1] ,
for non-negative values Dijkstra will solve the problem in ( O(N^2) )
and Floyd-Warshal is the solution for negative cells. ( O(N^3) )
On Mon, Jun 4, 2012 at 11:20 AM, atul anand atul.87fri...@gmail.com wrote:
this recurrence wont work..ignore
On Mon, Jun 4, 2012 at 8:55 AM, atul anand
i dont think so dijistra will worh here..bcozz we cannot move diagonally
...but according to matrix this path can be considered.
On Mon, Jun 4, 2012 at 1:39 PM, Hassan Monfared hmonfa...@gmail.com wrote:
for non-negative values Dijkstra will solve the problem in ( O(N^2) )
and Floyd-Warshal is
@hasan :-ohhh sorry, i didn't see the outer loop
yeah, it works but it is O(n^2), required solution is of O(n).
On Mon, Jun 4, 2012 at 11:20 AM, Hassan Monfared hmonfa...@gmail.comwrote:
utsav: It works fine, I did little bug fixing on boundaries as here goes :
bool IsValid(string s)
{
Hi we need find a node in linked list in O(logn). You can change the list
as u like.
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To view this discussion on the web visit
https://groups.google.com/d/msg/algogeeks/-/vSoEXlaRTEIJ.
To post
not possible i suppose..
--
Amol Sharma
Third Year Student
Computer Science and Engineering
MNNIT Allahabad
http://gplus.to/amolsharma99
http://twitter.com/amolsharma99http://in.linkedin.com/pub/amol-sharma/21/79b/507http://www.simplyamol.blogspot.com/
On Mon, Jun 4, 2012 at 3:00 PM,
here is the question ans solution with proper explanation
http://www.geeksforgeeks.org/archives/11604
--
Amol Sharma
Third Year Student
Computer Science and Engineering
MNNIT Allahabad
http://gplus.to/amolsharma99
names[3] = names[4]; //Cant be done like these as they are char arrays
On Mon, Jun 4, 2012 at 4:12 AM, mahendra sengar sengar.m...@gmail.comwrote:
main()
{
static char names[5][20]={pascal,ada,cobol,fortran,perl};
int i;
char *t;
t=names[3];
names[3]=names[4];
names[4]=t;
for
This is possible only if Linked List is sorted then we can apply Merge Sort
for Linked List which would be in place.
Otherwise the time complexity would be O(n logn).
On Mon, Jun 4, 2012 at 3:00 PM, VIHARRI viharri@gmail.com wrote:
Hi we need find a node in linked list in O(logn). You can
Dear all,
On behalf, of *Google Developer Group New Delhi *(formerly known as* GTUG
New Delhi*) , I would like to inform you that we are going to host *H-A-C-K
- Code for a Cause, *a hackathon, on *16-17th June* at the *Indian
Habitat Center, New Delhi*.
*HACK- Code for a Cause* is being
i have not implemented it but i can you an idea how to approach it.
Go to Each suffix in suffix or suffix array(I would prefer suffix array as
it is easier) traverse the each suffix till you encounter the first letter
of the suffix you are traversing and check to see this suppose i is the
index
actually the address of name is constant and that get modifed , so
thats not possible once name is converted to pointer then this assignment
is posible .
On Mon, Jun 4, 2012 at 10:51 AM, Hassan Monfared hmonfa...@gmail.comwrote:
you can't assign value into names[i]!
On Mon, Jun 4, 2012 at
i think gene is correct in normal RAM it is impossible @abhishek you
are talking about parallel algorithms but till this extent is not possible
to implement in general computers..
@abhinav you was correct.. firsst we will have to make heap tree which is
impossible in log(n) time...
On Sun,
can be done using skip lists
On Mon, Jun 4, 2012 at 3:03 PM, Jeevitesh jeeviteshshekha...@gmail.comwrote:
This is possible only if Linked List is sorted then we can apply Merge
Sort for Linked List which would be in place.
Otherwise the time complexity would be O(n logn).
On Mon, Jun 4,
moving must be done in A* style
On Mon, Jun 4, 2012 at 1:17 PM, atul anand atul.87fri...@gmail.com wrote:
i dont think so dijistra will worh here..bcozz we cannot move diagonally
...but according to matrix this path can be considered.
On Mon, Jun 4, 2012 at 1:39 PM, Hassan Monfared
as question says you can change the list as u like...i guess skip list is
the answer.
On Mon, Jun 4, 2012 at 3:51 PM, SANDEEP CHUGH sandeep.aa...@gmail.comwrote:
can be done using skip lists
On Mon, Jun 4, 2012 at 3:03 PM, Jeevitesh jeeviteshshekha...@gmail.comwrote:
This is possible only
whats problem with the approch provided by navin
http://k2code.blogspot.in/2011/09/deleting-node-in-singly-linked-list-if.html
it seems much simpler ...is there any test case for which it wont work ??
On Mon, Jun 4, 2012 at 3:25 PM, Amol Sharma amolsharm...@gmail.com wrote:
here is the
mailing you the link for same
On Mon, Jun 4, 2012 at 1:31 AM, Dhaval Moliya moliyadha...@gmail.comwrote:
If any one have algorithms for interviews by adnan aziz ebook... Please
mail ...
Thanks
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks
Given a dictionary of millions of words, give an algorithm to find the
largest possible rectangle of letter that every row forms a word(reading
left to right) and every column forms a word(reading from top to bottom).
Best Regards
Ashish Goel
Think positive and find fuel in failure
+919985813081
Give a sample please
On Mon, Jun 4, 2012 at 5:34 PM, Ashish Goel ashg...@gmail.com wrote:
Given a dictionary of millions of words, give an algorithm to find the
largest possible rectangle of letter that every row forms a word(reading
left to right) and every column forms a word(reading from
@Victor - Someone had asked this question from me !! He told me its from
Project Euler Q-83.
@Hassan - I think you are right. This question can be solved by
Dijikstra's algo, if we consider the matrix elements as weights.
On Monday, 4 June 2012 16:28:31 UTC+5:30, Hassan Monfared wrote:
Hi ,
I think the only possiblity is to make it doubly linked list and then
consider next prev as left and right child like tree and then perform
search as we in tree , it would serve the purpose .
let me know if iam wrong .
On Mon, Jun 4, 2012 at 3:51 PM, SANDEEP CHUGH
This code have issue.
names[3]=names[4];
names[4]=t;
-Original Message-
From: algogeeks@googlegroups.com [mailto:algogeeks@googlegroups.com] On
Behalf Of mahendra sengar
Sent: Monday, June 04, 2012 4:13 AM
To: Algorithm Geeks
Cc: sengar.m...@gmail.com
Subject: [algogeeks] Simple Question
Answer:
Compiler error: Lvalue required in function main
This was the answer given along with the question..pls explain !!
On Mon, Jun 4, 2012 at 10:04 PM, abhishek zeal.gosw...@gmail.com wrote:
This code have issue.
names[3]=names[4];
names[4]=t;
-Original Message-
From:
I think it can be done by modifying the h-array and by making some changes
in KMP-algorithm
On Mon, Jun 4, 2012 at 9:35 AM, Jeevitesh jeeviteshshekha...@gmail.comwrote:
i have not implemented it but i can you an idea how to approach it.
Go to Each suffix in suffix or suffix array(I would
@Viharri: You can use skip list.
On Mon, Jun 4, 2012 at 3:30 PM, algogeeks@googlegroups.com wrote:
Today's Topic Summary
Group: http://groups.google.com/group/algogeeks/topics
- MS Question: Delete a node in single linked list if it is less than
any of the successor nodes
preparing a sample itself is a great problem here, that is why i called it
hard
all words in the rectangle horizontally as well as vertically needs to be
valid dictionary words
Ashish
Hassan
say this rectangle AH,SA,HS,IS,SA,HN should also be valid dictonary words,
indeed they are not..
well converting single linked list to balanced BST...this would also work
On Mon, Jun 4, 2012 at 4:29 PM, Nishant Pandey nishant.bits.me...@gmail.com
wrote:
Hi ,
I think the only possiblity is to make it doubly linked list and then
consider next prev as left and right child like tree and
28 matches
Mail list logo