using System; using System.Linq; using static System.Runtime.InteropServices.JavaScript.JSType; class Program { public static void Main() { ProblemStatementOne.ArrayHeights(); ProblemStatementTwo.RearrangeArray(); } } public static class ProblemStatementOne { public static void ArrayHeights() { int[] heights = { 10, 6, 8, 5, 11, 9 }; //exp op [3,1,2,1,0] List<int> result = new List<int>(); for (int i = 0; i < heights.Length; i++) { int count = 0; for (int j = 0; j < i; j++) // look only to the left { ...
Comments
Post a Comment