glbajaj

ONGOING EVENTS

THIS CONTEST IS FOR STUDENTS OF IT & MCA IN G.L. BAJAJ COLLEGE, Greater Noida

CONTEST TIMING CHANGED TO 1st MAY (SORRY FOR THE INCONVENIENCE)

Please click on the below link to participate in the online test (Starting 01 May-2018 @ 9:00 pm)

https://www.hackerrank.com/rtech-april-18-01

——————————————————————-

Please click on the below link to participate in the online test (Starting 28 March-2018 @ 12:30 pm) – CLOSED

https://www.hackerrank.com/rtech-march-18-002

——————————————————————-

Please click on the below link to participate in the online test (Starting 17 March-2018 @ 9:00 pm) – CLOSED

https://www.hackerrank.com/rtech-march-18-001

Past Events

Please click on the below link to participate in the online test (Starting 15 March-2018 @ 9:00 pm) – CLOSED

https://www.hackerrank.com/rtech-mar-18-002

Please click on the below link to participate in the online test (Starting 8 March-2018 @ 12:30pm) – CLOSED

https://www.hackerrank.com/rtech-mar-18-001

Please click on the below link to participate in the online test (Starting 26 Feb-2018 @ 12:30pm) – CLOSED

https://www.hackerrank.com/ritambhara-tech-feb-18-001

using namespace std;

struct Node
{
  int data;
  Node* next;

  Node(int x){
    data = x;
    next = NULL;
  }
};

Node* createList(int i)
{
  Node * h = NULL;
  switch(i)
  {
    case 1: // 2-> 5-> 0
      h = new Node(2);
      h->next = new Node(5);
      h->next->next = new Node(0); break;
    case 2: // 4-> 6-> 1
      h = new Node(4);
      h->next = new Node(6);
      h->next->next = new Node(1); break;

    case 3: // 3->9->8->7
      h = new Node(3);
      h->next = new Node(9);
      h->next->next = new Node(8);
      h->next->next->next = new Node(7);
      break;

  }
  return h;
}

void printList(Node* h)
{
  while(h != NULL)
  {  cout<data<<" "; h = h->next;
  }
  cout<<"\n";
}

Node* merge(Node* h1, Node* h2, Node* h3)
{
 // INSERT YOUR CODE HERE
}

int main()
{
  Node* h1 = createList(1);
  Node* h2 = createList(2);
  Node* h3 = createList(3);

  printList(h1);
  printList(h2);
  printList(h3);
}