Billy Wilder's The Apartment is one of the most iconic Hollywood comedies of all-time. Released in 1960, it came only a year after the huge success of Wilder's Some Like it Hot. Because Some Like It Hot had done so well with critics and audiences, producers wanted to find another vehicle for star Jack Lemmon. The story itself, based on a Noel Coward play called Brief Encounter, was one that Wilder had wanted to adapt for film back in the 1940s, but could not because of the Hays Production Code, which did not allow the depiction of adultery in film. With the Hays Code now gone, Wilder had the opportunity to make his own adaptation of the story, this time in a way that would reflect the changing sexual mores of the swinging 1960s in New York City.
The film's plot was based both on the Noel Coward play as well as an actual Hollywood scandal of the time, in which an agent was using a less powerful employee's apartment to have an affair with a producer's wife. During filming, Billy Wilder had his actors maintain a strong fidelity to the screenplay, only allowing for certain moments of improvisation. The resulting film is what is known as a "sex comedy," a film in which the comedic scenarios are motivated primarily by sexuality.
The film was met with mixed reviews at the time of its release, but made double its budget ($3 million) at the box office. Some critics and audiences were offended by its no-holds-barred depiction of sexuality and adultery, while others found its irreverent and straightforward tone refreshing. In spite of the mixed response, The Apartment did very well during awards season, earning 10 nominations for Academy Awards. The film's plot inspired the 1968 musical Promises, Promises by Burt Bacharch, Hal David, and Neil Simon. It has been lauded by critics as one of the best American films of all time.