The BJP is on course to form a government in Delhi after 27 years, while the Aam Aadmi Party failed to secure a hat-trick.