title: Google Interview: Arrangement of Blocks
body: <p>You are given N blocks of height 1…N. In how many ways can you arrange these blocks in a row such that when viewed from left you see only L blocks (rest are hidden by taller blocks) and when seen from right you see only R blocks? Example given <code>N=3, L=2, R=1</code> there is only one arrangement <code>{2, 1, 3}</code> while for <code>N=3, L=2, R=2</code> there are two ways <code>{1, 3, 2}</code> and <code>{2, 3, 1}</code>.</p>
  
  <p>How should we solve this problem by programming? Any efficient ways?</p>