Code For Alls..!

get the code!!

Showing posts with label cpp. Show all posts
Showing posts with label cpp. Show all posts

Monday, 18 September 2017

                                                                          Three Strings Given N string values, the program must print 3 string values as the...

Sunday, 17 September 2017

                                                Minimum Distance Between Alphabets (Id-3109) Given a string S and two alphabets C1 and C2 present in S, find the minimum distance D  between C1 and C2 in S. Input Format: The...

Sunday, 10 September 2017

Thursday, 7 September 2017

Sunday, 3 September 2017

You’re given the pointer to the head node of a linked list. Change the next pointers of the nodes so that their order is reversed. The head pointer given may be null meaning that the initial list is empty. Input Format You have to complete the Node* Reverse(Node* head) method which takes one argument - the head of the linked...
You are given the pointer to the head node of a linked list and you need to print all its elements in reverse order from tail to head, one element per line. The head pointer may be null meaning that the list is empty - in that case, do not print anything! Input Format You have to complete the void ReversePrint(Node* head) method which takes...
You’re given the pointer to the head node of a linked list and the position of a node to delete. Delete the node at the given position and return the head node. A position of 0 indicates head, a position of 1 indicates one node away from the head and so on. The list may become empty after you delete the node. Input Format You have to complete...
You’re given the pointer to the head node of a linked list, an integer to add to the list and the position at which the integer must be inserted. Create a new node with the given integer, insert this node at the desired position and return the head node. A position of 0 indicates head, a position of 1 indicates one node away from the head and so...
You’re given the pointer to the head node of a linked list and an integer to add to the list. Create a new node with the given integer, insert this node at the head of the linked list and return the new head node. The head pointer given may be null meaning that the initial list is empty. Input Format You have to complete the Node* Insert(Node*...
Four strings all having the same length L are passed as the input to the program. The four strings must be printed in a L*L square matrix shape as shown in the example input/output. The string which is on the top will always be the first string in the input. Other three strings can occur in a random order in the input. The sequence of the string...

Saturday, 2 September 2017

You are given the pointer to the head node of a linked list and an integer to add to the list. Create a new node with the given integer. Insert this node at the tail of the linked list and return the head node of the linked list formed after inserting this new node. The given head pointer may be null, meaning that the initial list is empty. Input...
If you're new to linked lists, this is a great exercise for learning about them. Given a pointer to the head node of a linked list, print its elements in order, one element per line. If the head pointer is null (indicating the list is empty), don’t print anything. Input Format The void Print(Node* head) method takes...

Saturday, 22 July 2017

Given a time in -hour AM/PM format, convert it to military (-hour) time. Note: Midnight is on a -hour clock, and on a -hour clock. Noon is on a -hour clock, and on a -hour clock. Input Format A single string containing a time in -hour clock format (i.e.: or ), where and . Output Format Convert and print the given time in -hour format,...