Skip to content

Commit 4d75568

Browse files
committed
Using stack , basically the idea is if the backcar takes less time to reach destination than front car then it must mean that the become a fleet and remove the backcar since obviously if backcar crosses front car it has higher speed than front car but we need the speed to be equal to minimum speed when it becomes a fleet so thats why we remove backcar and not front car and then in the end return length of stack
1 parent 3ed8df3 commit 4d75568

File tree

4 files changed

+159
-0
lines changed

4 files changed

+159
-0
lines changed

‎853. Car Fleet.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
class Solution(object):
2+
def carFleet(self, target, position, speed):
3+
"""
4+
:type target: int
5+
:type position: List[int]
6+
:type speed: List[int]
7+
:rtype: int
8+
"""
9+
time = [(position[i],speed[i]) for i in range(len(speed))]
10+
time.sort(reverse=True)
11+
stack = [time[0],]
12+
13+
for i in range(1,len(speed)):
14+
if(float((target-time[i][0]))/time[i][1]<=float((target-stack[-1][0]))/stack[-1][1]): #basically checking if back car ka time <= front car ka time
15+
continue
16+
else:
17+
stack.append(time[i])
18+
return len(stack)

‎countries.csv

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Country,Count
2+
United States,5
3+
India,4
4+
Bangladesh,3
5+
Sweden,2
6+
United Kingdom,2
7+
China,8
8+
France,1
9+
Canada,2
10+
Japan,1
11+
Netherlands,1
12+
Pakistan,1
13+
Turkey,2
14+
Australia,1
15+
South Korea,1
16+
Saudi Arabia,1
17+
Germany,1

‎institution.csv

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
University Name,Count
2+
Weill Cornell College of Medicine,2
3+
Vellore Institute of Technology,1
4+
Chittagong University of Engineering and Technology,1
5+
Puducherry Technological University,1
6+
Aston University,1
7+
Lund University,1
8+
King’s College,1
9+
Daffodil International University,1
10+
Medi-Caps University,1
11+
Shanxi Medical University,1
12+
Lovely Professional University,1
13+
Jagannath University,1
14+
West Virginia University Heart and Vascular Institute,1
15+
Inonu University,1
16+
Goce Delčev University of Štip,1
17+
University of Waterloo,1
18+
Dhaka International University,1
19+
Sharif University of Technology,1
20+
Innovation Campus Paris,1
21+
University of California,2
22+
Thomas Jefferson University Hospital,1
23+
American College of Chest Physicians,1
24+
Beijing Institute of Heart, Lung and Blood Vessel Diseases,1
25+
Kean University,1
26+
Bharath Institute of Higher Education and Research,1
27+
Kirklareli University,1
28+
Shanghai Pudong Hospital,1
29+
Shandong First Medical University,1
30+
Massachusetts Institute of Technology,2
31+
University of Texas Southwestern Medical Center,1
32+
University of Michigan,1
33+
University of California Los Angeles,1
34+
Columbia University Irving Medical Center,1
35+
Toronto Metropolitan University,1
36+
East China University of Science and Technology,1
37+
Southwest Medical University,1
38+
Mayo Clinic,1
39+
Amrita School of Engineering,1
40+
University of Alberta,1
41+
Ningbo Hospital,1
42+
Chinese PLA General Hospital,1
43+
Chongqing Medical University,1
44+
Hokkaido University,1
45+
University of Toledo,1
46+
Peter Munk Cardiac Centre,1
47+
University of Amsterdam,1
48+
University of Louisiana at Lafayette,1

‎ssd.txt

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
[Opening shot: A futuristic AI interface with data flowing]
2+
3+
Narrator (V.O.): "In the world of Artificial Intelligence, two key principles stand tall - Reliability and Interpretability."
4+
5+
[Transition: Split screen showing Reliability on one side and Interpretability on the other]
6+
7+
Narrator (V.O.): "First, let's talk about Reliability."
8+
9+
[Scene 1: A shaky bridge over a deep ravine]
10+
11+
Narrator (V.O.): "Imagine you're crossing a bridge. You want it to be reliable, right?"
12+
13+
[Visualization: A graphical representation of AI reliability]
14+
15+
Narrator (V.O.): "Reliable AI systems are like sturdy bridges. They work consistently and don't fail us when we need them most."
16+
17+
[Scene 2: A self-driving car navigating smoothly]
18+
19+
Narrator (V.O.): "Self-driving cars rely on AI to navigate our roads safely."
20+
21+
[Visualization: A green checkmark appears next to "Reliability"]
22+
23+
Narrator (V.O.): "We trust them because they're built on reliable AI algorithms."
24+
25+
[Transition: Moving to the Interpretability side]
26+
27+
Narrator (V.O.): "Now, let's explore Interpretability."
28+
29+
[Scene 3: A doctor examining an AI-generated medical diagnosis]
30+
31+
Narrator (V.O.): "Imagine a doctor using AI to diagnose a patient. Interpretability is crucial here."
32+
33+
[Visualization: A graphical representation of AI interpretability]
34+
35+
Narrator (V.O.): "Interpretable AI systems provide clear explanations for their decisions."
36+
37+
[Scene 4: Doctor receives a detailed explanation from AI]
38+
39+
Narrator (V.O.): "This helps the doctor understand why AI suggested a particular treatment."
40+
41+
[Visualization: A green checkmark appears next to "Interpretability"]
42+
43+
Narrator (V.O.): "Interpretability builds trust and ensures responsible AI use."
44+
45+
[Transition: Back to the split screen]
46+
47+
Narrator (V.O.): "In the world of AI, Reliability and Interpretability go hand in hand."
48+
49+
[Scene 5: A team of engineers working together]
50+
51+
Narrator (V.O.): "Engineers, data scientists, and policymakers collaborate to achieve this balance."
52+
53+
[Visualization: A balance beam with "Reliability" and "Interpretability" equally weighing]
54+
55+
Narrator (V.O.): "They strive to make AI systems that are both powerful and transparent."
56+
57+
[Closing shot: A futuristic AI interface with "Reliable and Interpretable AI" displayed]
58+
59+
Narrator (V.O.): "So, as we continue to shape the future with AI, remember these two pillars - Reliability and Interpretability."
60+
61+
[End: Animation fades out]
62+
63+
Narrator (V.O.): "Reliable and Interpretable AI - Building a smarter, safer, and more understandable world."
64+
65+
7min ppt
66+
2min video
67+
1min social media problem formulate , no need to get to solution
68+
69+
PPT
70+
2min Motivation
71+
1min problem formulation
72+
2min existing Solution
73+
1min comparison (comparison b/w existing and your solution)
74+
1min conclusion
75+
76+
No Themes for ppt, use overleaf latex for ppt, convey your words, cite research paper, overleaf -> Beamer

0 commit comments

Comments
 (0)