Question Name:Binary Search tree

#include <stdio.h>
int main()
{
int a;
  scanf("%d",&a);
  if(a%2==0) { printf("Yes"); } 
  else { printf("No"); } 
	return 0;
}

Problem Description

Given a binary search tree and a sorted sub-sequence. the task is to check if the given sorted sub-sequence exist in binary search tree or not.

200px-Binary_search_tree.svg

Examples:

// For binary search tree
Input : seq[] = {4, 6, 8, 14}
Output: “Yes”

Input : seq[] = {1, 2, 3, 8}
Output: “No”

  • Test Case 1

    Input (stdin)

    0
    

    Expected Output

    Yes
  • Test Case 2

    Input (stdin)

    0
    

    Expected Output

    0

Leave a Reply

Your email address will not be published. Required fields are marked *

Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Powered By
CHP Adblock Detector Plugin | Codehelppro