filmov
tv
Day 3 Challenge | Competitive Coding #python #pythonprogramming #clanguage #shorts #ytshorts #code

Показать описание
Day 3 Coding interview questions #amazon #google #adobe #facebook #coding #interviewquestions #shorts #ytshorts #yiutubeviralshorts #yiutubeshorts #viralshorts #viralshortvideo #viral #shortsquestions #challenges #lifechanging #lifechangingvideo #lifechange #lifeset #crackthecode #optimise #crackthecompetition #solve
Question 1
Merge Two Sorted Lists Easy
You are given the heads of two sorted linked lists list1 and list2 .
Merge the two lists in a one sorted list. The list should be made by splicing
together the nodes of the first two lists.
Return the head of the merged linked list
Question 2
Best Time to Buy and Sell Stock Easy
You are given an array prices where prices[i] is the price of a given
stock on the ith day.
You want to maximize your profit by choosing a single day to buy one
stock and choosing a different day in the future to sell that stock.
Return the maximum profit you can achieve from this transaction.
If you cannot achieve any profit, return 0
Question 1
Merge Two Sorted Lists Easy
You are given the heads of two sorted linked lists list1 and list2 .
Merge the two lists in a one sorted list. The list should be made by splicing
together the nodes of the first two lists.
Return the head of the merged linked list
Question 2
Best Time to Buy and Sell Stock Easy
You are given an array prices where prices[i] is the price of a given
stock on the ith day.
You want to maximize your profit by choosing a single day to buy one
stock and choosing a different day in the future to sell that stock.
Return the maximum profit you can achieve from this transaction.
If you cannot achieve any profit, return 0