here in algorithm we are directly doing i-1 and j-1
there maybe possibilty that i=0 than after -1 it will become -1 and thats incorrect isnt it?
Sir here in approach 2
yeah correct,
handle such corner cases by adding if statements.
here in algorithm we are directly doing i-1 and j-1
there maybe possibilty that i=0 than after -1 it will become -1 and thats incorrect isnt it?
yeah correct,
handle such corner cases by adding if statements.