Link Details

Link 97355 thumbnail
User 270080 avatar

By sembee
via fsharp.it
Submitted: Jul 23 2008 / 03:29

Checking whether a series of parenthesis is balanced and valid is a classic puzzle in computer science and can be easily met during a job interview. Even if a regular expression can be a perfect solution, the problem can be also solved using an easy algorithm that makes use of recursion and a LIFO data structure such as a stack. In this post, the algorithm is presented together with its F# implementation.
  • 1
  • 0
  • 94
  • 11

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (1)



Voters Against This Link (0)