Detail Form
We will send your result on your email id and phone no. please fill detail
Given an array, A of size N consisting of elements 1 to N. A boolean array B consisting of N-1 elements indicates that if B[i] is 1, then A[i] can be swapped with A[i+1].
Find out if A can be sorted by swapping elements.
Reverse a Stack without using recursion and extra space. Even the functional Stack is not allowed.
Examples:
Input : 1->2->3->4 Output : 4->3->2->1 Input : 6->5->4 Output : 4->5->6
Examples:
Input : 15 14 13 22 17 Output : Linked list are: 17 -> 22 -> 13 -> 14 -> 15 -> NULL Maximum element in linked list: 22 Minimum element in linked list: 13 Input : 20 25 23 68 54 13 45 Output : Linked list are: 45 -> 13 -> 54 -> 68 -> 23 -> 25 -> 20 -> NULL Maximum element in linked list: 68 Minimum element in linked list: 13
Given a Linked List, write a function that accepts the head node of the linked list as a parameter and returns the value of node present at (floor(sqrt(n)))th position in the Linked List, where n is the length of the linked list or the total number of nodes in the list.
Examples:
Input: 1->2->3->4->5->NULL Output: 2 Input : 10->20->30->40->NULL Output : 20 Input : 10->20->30->40->50->60->70->80->90->NULL Output : 30