allcoding1_official
106K subscribers
766 photos
2 videos
73 files
759 links
Download Telegram
10Q) Ans
๐Ÿ‘2
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).
๐Ÿ‘5โค1
11Q) Ans
๐Ÿ‘1
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_official

Share with your friends ๐Ÿ‘ญ๐Ÿ‘ฌ
๐Ÿ‘3
๐ŸŽฏ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_official

Share with your friends ๐Ÿ‘ญ๐Ÿ‘ฌ
๐Ÿ‘4
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_official

Share with your friends ๐Ÿ‘ญ๐Ÿ‘ฌ
๐Ÿ‘2
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_official

Share with your friends
๐Ÿ‘2
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_official

Share with your friends
๐Ÿ‘7
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_official

Share with your friends
๐Ÿ‘3
๐Ÿ‘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
๐Ÿ‘5โค1
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
๐Ÿ‘3
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
๐Ÿ‘3
Company Name: ServiceNow
Role: Software Engineer

Batch eligible: 2022/2023/2024 grads

Apply: https://careers.servicenow.com/en/jobs/744000006685565/software-engineer/?trid=2d92f286-613b-4daf-9dfa-6340ffbecf73
๐Ÿ‘2