BETA

Difficulty Level:

Basic

Total Submissions: 749 Accuracy:

16.29%

Operating a sorted array (Function Problem)
     

Given a sorted array A[], your task is to do some operations, i.e., search an element, insert an element, and delete an element by completing the functions.

Input:
First line of input consists if T, number of test cases. First line of every test case consists of an integer N, denotes the number of elements in an array. Second line of every test cases consists of N spaced integers Ai. Third line of every test case consists of three integers X ,Y and Z, denoting the elements for search operation, insert operation and delete operation respectively.

Output:
Return 1 for each operation if done successfully else 0.

Constraints:
1<=T<=100
1<=N<=100
1<=Ai<=100

Example:
Input:

1
5
1 2 3 4 5
1 6 3
Output:
1 1 1

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Saksham Raj Seth


					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.