allcoding1
27.8K subscribers
2.2K photos
2 videos
74 files
847 links
Download Telegram
10Q) Ans
11Q) Bob was walking his dog in the village.

Unfortunately he got lost in an orange grove and wants to reach the exit.
The grove can be represented as a 2D grid consisting of N rows and M columns such that

• The rows are number from 1 to N from top to down.


The columns are numbered from 1 to M from left to right.

Each cell (i, j) of the grid has either of the following

• An orange tree with A[i][j] oranges.

• An infinite number of lanterns.


It is given that cells with lanterns will be have value 0.
the beginning, Bob is at cell (1, 1) and he wants to reach the exit at cell (N, M). He can move either right or down in the grove. As Bob reaches a cell (i, j), he will eat some amount of oranges from the tree in that cell (at most A[i][j]). In case this cell has lanterns, he will not be able to eat any oranges.


Bob wants to mark the path he's following with lanterns, so when he reaches a cell he will send his dog to some cell which has lanterns then the dog will pick up a lantern and comeback to Bob to put the lantern in that cell



The dog can move up, down, left and right in the grid, and the dog travels 1 kilo meter when moving from one cell to another.


When Bob moves from one cell to another, his dog will follow him as well.

Bob defines the profit of a path that leads him to
the exit as the difference between the total amount
of oranges he could eat along that path and theof oranges he could eat along that path and the total distance in kilo meters his dog traveled along that path


Find the maximum profit of a path that leads Bob to the exit of the grove

The distance the dog travels with Bob when Bob moves from cell to another is not included (only the distance of getting lanterns is calculated for the dog)

• Bob will put lanterns in every cell of the path, including the starting and ending cells.

He can also move to a cell which has lanterns, but this will not affect the amount of oranges.


It is guaranteed that there is at least one cell with lanterns.
Input Format



The first line contains an integer, N, denoting the number of rows in Grid.




The next line contains an integer, M, denoting the number of columns in Grid.


Each line i of the N subsequent lines (where 0≤i< N) contains M space separated integers each describing the row Grid[i].
Constraints


1 <= N <= 10^5

1 <= M <= 10^5

0 <= Grid[i][j] <= 10^9
Sample Test Cases

Case 1

Input:

1

1

0

Output:

0

Explanation:

N=1, M-1, Grid=0

Bob is already at the ending cell, bob will not eat oranges and the dog will not travel anywhere since this cell has lanterns.

So the answer is 0.
Output:

2


Explanation:

N-2, M-2, Grid-[[3,0], [5,2]]



In the beginning, Bob will eat 3 oranges at cell (1, 1) then he will send his dog to cell (1, 2) to get a lantern, the dog will travel 2kms back and forth.


Then Bob will move with dog to cell (2, 1), eat 5 oranges and send his dog to cell (1, 2) again, the dog will travel 4kms (2kms for going and 2 for returning).

Finally Bob will move with the dog to the exit cell (2, 2), eat 2 oranges and send his dog to cell (1, 2), the dog will travel 2kms to get the lantern.

The final answer is 3-2 + 5-4 + 2-2 = 2.
Output:

3

Explanation:

N-3, M-3, Grid=[[5,4,0], [1,1,1], [6,5,0]]

Bob will take the path (1, 1), (1, 2), (2, 2), (3, 2), (3, 3) with profit: 5-4 + 4-2 + 1-4 + 5-2 +0 = 3

In cells (1, 1), (1, 2) Bob will send his dog to cell (1, 3) to get the lanterns.

In the remaining cells he will send the dog to cell (3, 3).
👍3
11Q) Ans
👍2
Principal Global hiring Software Engineer

2022 and before batches eligible

Apply Now :
https://careers.principal.com/in/jobs/43329?lang=en-us&iis=Job+Board&iisn=Linkedin
🎯 Citrusbug Off Campus Drive 2024 Freshers | Software Engineer | Rs. 4-6 LPA

Job Role : Software Engineer
Qualification : B.Tech /M.Tech / MCA
Experience : Freshers
Package : 4-6 LPA

Apply Now:- https://citrusbug.com/career/software-engineer

Telegram:- @allcoding1

Share with your friends 👭👬
🎯Cognizant Hiring Fresher For IT Programmer Trainee
Location: PAN India
Qualification: Any 3 Years Graduate
Work Experience: Fresher
CTC: 2.5 LPA
Last Date: 7th Agust

Apply Now:-
https://app.joinsuperset.com/join/#/signup/student/jobprofiles/92217fe2-2130-461c-9be3-97c0ffb9e9da

Telegram:- @allcoding1

Share with your friends 👭👬
👍2
Virtusa Hiring for various roles:

Graduation Year: 2021 / 2022 / 2023 / 2024

Experience: Fresher

Expected Salary: 4 to 6 LPA

1. Junior Software Engineer Job in Hyderabad:
Apply Link: https://www.virtusa.com/careers/in/hyderabad/digital/junior-software-engineer-job-in-hyderabad-india/job-38640

2. Junior Software Engineer - Java Job in Chennai:
Apply Link: https://www.virtusa.com/careers/in/chennai/technology-and-engineering/junior-software-engineer-java-job-in-chennai-india/job-38951

3. Junior Software Engineer - Java Job in Bangalore:
Apply Link: https://www.virtusa.com/careers/in/bangalore/technology-and-engineering/junior-software-engineer-java-job-in-bangalore-india/job-38952
https://telegram.me/PLACEMENTLELO
4. Junior Software QA Engineer Job in Bangalore:
Apply Link: https://www.virtusa.com/careers/in/bangalore/digital/junior-software-qa-engineer-job-in-bangalore-india/job-38949

5. Core Junior Developer Job in Bangalore:
Apply Link: https://www.virtusa.com/careers/in/bangalore/technology-and-engineering/core-jr-developer-job-in-bangalore-india/job-38628

6. Junior Software Engineer - Java Job in Pune:
Apply Link: https://www.virtusa.com/careers/in/pune/technology-and-engineering/junior-software-engineer-java-job-in-pune-india/job-38967

Telegram:-  @allcoding1

Share with your friends 👭👬
👍1
PayU is hiring Generative AI intern

For 2024, 2025, 2026 grads
Location: Gurugram

https://jobs.eu.lever.co/payu/98ed6cbf-afa0-4bf6-b4ba-cfb0250ba9e9

Telegram:-  @allcoding1

Share with your friends 👭👬
Software Engineer || Capgemini Exceller 2023-24
Capgemini · Mumbai


Application Deadline : 15 August 2024 11:59 PM

Apply Now:-
https://app.joinsuperset.com/join/#/signup/student/jobprofiles/6e4f8e33-c0a0-4348-83af-66cd8aa8ff9e

Telegram:-  @allcoding1

Share with your friends
1
Oracle is hiring System Analyst

For 2022, 2023, 2024 grads
Location: Bangalore

Apply Now:-
https://careers.oracle.com/jobs/#en/sites/jobsearch/job/226529/

Telegram:-  @allcoding1

Share with your friends
👍1
S&P global is hiring for Software Engineer ( Intern )

2025/2024/2023 passouts eligibile

2-4 LPA ( stipend )

Apply Now:- https://careers.spglobal.com/jobs/301859?lang=en-us

Telegram:-  @allcoding1

Share with your friends
👍2
1👍1
Klinck Finance is hiring Full-stack Engineer

For 2021, 2022 grads
Location: Remote

Apply now:-
https://join.com/companies/klinkfinance/12099605-mid-level-fullstack-engineer-at-crypto-web3-startup?source=web3.career
Bluecore is hiring Back-end Engineer

For 2021, 2022, 2023 grads
Location: Remote

Apply now:-
https://www.bluecore.com/job-posting/?lever-source=LinkedIn&gh_jid=5074959004
Walmart Global Tech
For Software Engineer
Batch : 2024/2023/2022 passouts

Apply Now:- https://walmart.wd5.myworkdayjobs.com/en-US/WalmartExternal/job/XMLNAME--IND--SOFTWARE-ENGINEER-II_R-1903463