title: Worst Case Time Complexity for an algorithm
body: <p>What is the Worst Case Time Complexity t(n) :-
  I'm reading this book about algorithms and as an example
  how to get the T(n) for .... like the selection Sort Algorithm</p>
  
  <hr>
  
  <p>Like if I'm dealing with the selectionSort(A[0..n-1])</p>
  
  <pre><code>//sorts a given array by selection sort
  //input: An array A[0..n - 1] of orderable elements.
  //output: Array A[0..n-1] sorted in ascending order
  </code></pre>
  
  <p>let me write a pseudocode</p>
  
  <pre><code>for i &lt;----0 to n-2 do
    min&lt;--i
  for j&lt;--i+1 to n-1 do
     ifA[j]&lt;A[min] min &lt;--j
  swap A[i] and A[min]
  </code></pre>
  
  <p>--------I will write it in C# too---------------</p>
  
  <pre><code>private int[] a = new int[100];
  
  // number of elements in array
  private int x;
  
  // Selection Sort Algorithm
  public void sortArray()
  {
    int i, j;
    int min, temp;
  
    for( i = 0; i &lt; x-1; i++ )
    {
      min = i;
  
      for( j = i+1; j &lt; x; j++ )
      {
        if( a[j] &lt; a[min] )
        {
          min = j;
        }
      }
  
      temp = a[i];
      a[i] = a[min];
      a[min] = temp;
    }
  }
  </code></pre>
  
  <p>==================</p>
  
  <p>Now how to get the t(n) or as its known the worst case time complexity</p>