Pakistan's parliament is set to elect Nawaz Sharif as prime minister on Wednesday, completing a historic transition of power in the country's coup-riddled history. As the new premier, Sharif will face a mountain of problems, including militant attacks and an unprecedented power crisis.