예제 #1
0
 private static void DisplayAsTable(RecursionTasks recursion)
 {
     int[][] map = new int[][] {
         new int[] { 1, 2, 3, 4 },
         new int[] { 5, 6, 7, 8 },
         new int[] { 9, 11, 12, 13 }
     };
     recursion.PrintMapAsTable(map);
 }
예제 #2
0
        static void Main(string[] args)
        {
            RecursionTasks  recursion       = new RecursionTasks();
            QueueTasks      queueTasks      = new QueueTasks();
            AdditionalTasks additionalTasks = new AdditionalTasks();

            MyQueue <Trip>   trips    = new MyQueue <Trip>();
            MyQueue <Family> familyQ1 = new MyQueue <Family>();

            familyQ1.Insert(new Family("1", "shiran", 1));
            familyQ1.Insert(new Family("1", "miki", 2));
            familyQ1.Insert(new Family("1", "lili", 2));
            familyQ1.Insert(new Family("1", "zizi", 6));
            trips.Insert(new Trip("Tel aviv", "1", new DateTime(2020, 3, 5), 100, familyQ1));

            MyQueue <Family> familyQ2 = new MyQueue <Family>();

            familyQ2.Insert(new Family("2", "shiran", 4));
            familyQ2.Insert(new Family("2", "miki", 2));
            familyQ2.Insert(new Family("2", "lili", 3));
            familyQ2.Insert(new Family("2", "zizi", 5));
            trips.Insert(new Trip("Jerusalem", "2", new DateTime(2020, 3, 3), 80, familyQ2));

            Console.WriteLine(queueTasks.OperateDriveAndHike(new DateTime(2020, 3, 4), new DateTime(2020, 4, 4), "2", trips));

            //OperateSuperMarket();
            //GetGreatestCharFromSeperation(additionalTasks);
            //GetEqualDistancePairs(additionalTasks);
            //Console.WriteLine(Trouble(2,6));
            //TestTrackingTableQueue();
            //DisplayAsTable(recursion);
            //recursion.PrintAllEvenDigits(123456789);
            //MergeSuperQueues(queueTasks);
            //ArrangeSHop(queueTasks);
            //GetMiddleQueue(queueTasks);
            //GetPairQueue(queueTasks);
            //ReverseQueue(queueTasks);
            //MergeSortedQueues(queueTasks);
            //Jobs(queueTasks);
            //Carriers(queueTasks);
        }