From f663c2596f0026f8cc8ab3751cba52311487fe6b Mon Sep 17 00:00:00 2001 From: Deepak Yadav <31646033+deepakmca17du@users.noreply.github.com> Date: Sun, 24 Oct 2021 12:34:06 +0530 Subject: [PATCH] Create circularTour --- circularTour | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 circularTour diff --git a/circularTour b/circularTour new file mode 100644 index 0000000..8fc7f77 --- /dev/null +++ b/circularTour @@ -0,0 +1,18 @@ +int tour(petrolPump p[],int n) + { + int startPoint=0; + int out_of_tank=0; + int in_tank=0; + for(int i=0;i=0){ //if our current tank oil lvel can travel all throught the losses + return start; + } + return -1; //without double while loop + }