Hi please help me with this program in C language This progr

Hi please help me with this program in C++ language
This program was answered incorrectly by one expert
Please put comment and give out the out put so I can understand and please TEST THE PROGRAM FOR THE BOTH PARTS WITH THE FELLOWING OPERATIONS AND GIVE OUT THE OUTPUT.

Solution

using System;
using System.Collections.Generic;

namespace LinkedList
{
    class Program
    {
        static void Main(string[] args)
        {
            List<int> a = new List<int>();
            a.Add(1);
            a.Add(2);
            a.Add(5);
            a.Add(6);

            int value = 5;
            switch (value)
            {
                case 1:
                    SortedInsert(5, a, a.Count);
                    break;
                case 2:
                    SortedInsert(7, a, a.Count);
                    break;
                case 3:
                    SortedInsert(9, a, a.Count);
                    break;
                case 4:
                    SortedInsert(11, a, a.Count);
                    break;
                case 5:
                    SortedInsert(5, a, a.Count);
                    break;
                case 6:
                    foreach (int i in a)
                    {
                        Console.WriteLine(i);
                    }
                    break;
                case 7:
                    SortedInsert(7, a, a.Count);
                    break;
                case 8:
                    foreach (int i in a)
                    {
                        Console.WriteLine(i);
                    }
                    break;

                case 9:
                    SortedSearchPosition(a, 3);
                    break;
                case 10:
                    SortedFind(a, 7);
                    break;
                case 11:
                    Console.WriteLine(SortedGetLength(a));
                    break;
                case 12:
                    SortedDelete(7, a);
                    break;
                case 13:
                    foreach (int i in a)
                    {
                        Console.WriteLine(i);
                    }
                    break;
                case 14:
                    SortedFind(a, 7);
                    break;

            }

        }

        public static bool SortedIsEmpty(List<int> a)
        {
            if (a.Count == 0)
                return false;
            else
                return true;
        }

        public static int SortedGetLength(List<int> a)
        {
            return a.Count;
        }
        public static bool SortedSearchPosition(List<int> a, int k)
        {
            if (a.Count != 0)
            {
                return true;
                //if (a.Find(k))
                //{

                //}
            }
            return false;
        }
        public static int SortedFind(List<int> a, int k)
        {
            int element = 0;
            if (a.Count != 0)
            {
                return element;
                //if (a.Find(k))
                //{

                //}
            }
            return element;
        }
        public static bool SortedInsert(int x, List<int> a, int position)
        {

            a.Insert(position, x);
            return true;
        }
        public static bool SortedDelete(int k, List<int> a)
        {
            a.Remove(k);
            return true;
        }


    }


}

Hi please help me with this program in C++ language This program was answered incorrectly by one expert Please put comment and give out the out put so I can und
Hi please help me with this program in C++ language This program was answered incorrectly by one expert Please put comment and give out the out put so I can und
Hi please help me with this program in C++ language This program was answered incorrectly by one expert Please put comment and give out the out put so I can und

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site