title: Kth element in a spiral traversal of a special matrix
body: <p>We are given a square matrix which is filled with numbers from [1,n*n] in a row major form. We have to find the kth element when we traverse it in a spiral order. The only solution I could think was to to do a spiral traversal and maintain a counter for number of elements traversed. When 
  counter value becomes k, we print the number at that instance.</p>
  
  <p>Can this be solved in less than O(n*n)? If yes, then
   how to solve the same problem when matrix elements with random elements?</p>
  
  <p><a href="http://www.geeksforgeeks.org/amazon-interview-experience-set-273-on-campus/" rel="nofollow">Link to the question</a></p>