/* Copyright 2011–2019 by SSP Innovations Ltd. */
/* All Rights Reserved. Unauthorized copying, publication or disclosure prohibited. */
//======================================================================================
// OrdinateCount
//
// A non-empty array A consisting of N integers is given.
// An ordinate of an array is the value that appears in A[P], such that A[P-1] < A[P] > A [P + 1]
// For example, given array A such that:
// A[0] = 2, A[1] = 4, A[2] = 1, A[3] = 3, A[4] = 1, A[5] = 3, A[6] = 2
// A[1] is an ordinate since A[0] = 2 < A[1] = 4 > A[2] 1
// Write a function:
// class Solution { public int OrdinateCount(int[] A); }
// that, given a non-empty array A consisting of N integers, returns the ordinate count.
// Use the following assumptions:
// • N is an integer within the range [1..100,000];
// • each element of array A is an integer within the range [−1,000,000,000..1,000,000,000].
using System;
namespace SSP.Test
{
public static class Solution
//Entry
public static void Main()
int[] argsarray = new int[] {2, 4, 1, 3, 1, 3, 2};
}