In the pattern problem, i have made the observation that for Kth row there are there are (2k-1)th colmns, increment of val upto when row is equal to coln and decrement after that but i am facing problem in finding its pseudo code
Psuedo codes for the problems
can’t figure it out, can you please elaborate in detail?
Lets take value of n , suppose it to be 5
Now with every value of i, run a j loop for 2*i-1
So for i=1 we will print only one value in 1st row, i.e.,
1
for i=2 we will print 2 at starting and ending of row, and between it we will increment
232
for i=3, key value. we will print 3 at starting and ending of row, and between it we will increment and then decrement as you can see.
34543
for i=4. we will print 4 at starting and ending of row, and between it we will increment and then decrement as you can see.
4567654
for i=5. we will print 5 at starting and ending of row, and between it we will increment and then decrement as you can see.
567898765
i got the solution for this problem, can you pls explain the problem for adding digits and swapping the nos ?
You are asking algonfor swapping of two numbers ? By adding and subtracting?
If yes then you can see it here
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.