To relieve the pain for future readers:
this solution sort in the manner of height ascending first, and rank ascending if height tie (rank as defined as number of people taller than or equal to my height who is also standing before me).
After sorting, we iterate through people, for each people[i], we try to directly put it into the correct position. j is used to iterate from left to right in the output list, while ahead is used to record the actual number of slots that could be counted into the calculation of people[i]'s rank. If at position j we already have somebody placed, and also this somebody is shorter than people[i] (which is yet to be placed in this iteration of the outer loop), then we don't count this slot into ahead since people[i]'s rank's calculation does not take this slot's person into account anyway(he's shorter).
When ahead reaches people[i]'s rank, put him there.
Come on people, at least tell the readers what your variable name means.
Nice. That's my own original solution as well. I didn't like it much anymore after seeing the sort+insert idea. But I do find it very simple.
Here's a Python version. I put people into a pool together with a copy of their k-value, which then gets decreased during the run.
def reconstructQueue(self, people):
pool = [[p, p] for p in people]
queue = 
p = min(pool)
for other in pool:
if other <= p:
other -= 1