Friday, 3 June 2016

Haskell Programming Exercises

      Find last digit of a number
      Drop last digit from a number
      Reverse digits of a number
      Reverse digits and store them in list
      Double every other element of a list
      Calculate sum of digits of a number
      Find middle number
      Find maximum of three numbers
      Find maximum of four numbers
      Return True, if the list is empty (or) firstElement of the list is empty, else False
      Return True if the list has only one element, else False
      get first element of the list
      Write a function to concatenate elements of list of lists
      Check whether three numbers are in ascending order (or) not
      Concatenate two lists
      Find exact matches between two lists
      Find k least values in unsorted list
      How many are equal in three numbers
      Count number of lines in a file
      Count Number of words in a file
      Count number of characters in a file
      Remove first n elements of list
       How many are equal in four numbers
      Calculate sum of all elements in a list
      Return true if the first element of list 5
      Extract the value from Maybe data type
      Product of numbers from m to n
      Write a function that computes number of elements in list
      Write a function that computes the mean of a list
      Turn the String or list into a palindrome
      Implement a function that gives powers of 2
      Check whether given string (or) list is a palindrome or not
      Sort list of lists based on the length of sub lists
      Join list of lists using a separator
      Compute sum of factorials
      Compute the height of binary tree
      lines: split text on line boundaries
      break: Divide list based on a condition
      Implement multiplication of numbers
      Split lines whenever you see a digit
      Remove all spaces from a string
      Check whether an element is in the list or not
      implement quick sort using list comprehensions
      Check whether a list is prefix of other list
      Take second elements in list of tuples
      Find integer square root of a number
      Check whether a String is prefix of other String
      Check whether a list is suffix of other list
      Define length function using map and sum
      Check whether a String is suffix of other String
      Drop prefix from given String (or) list
      Tokenize a string based on a character
      Get index of element in the list
      get all the indexes of given element in the list
      Return an element from list that satisfies given predicate
      Return all the elements from list that satisfies given predicate
      Get index of element that satisfies given predicate
      Get all indexes of elements in list that satisfies given predicate
      Return two numbers in ascending order
      Get all the tails of a list
      Check whether a list is infix of other list
      Implement unzip function
      Remove duplicate elements from list
      Delete the first occurrence of element from list
      Implement deleteBy function
      Implement list difference
      Get all occurrences of a number in list
      Get all permutations starting with given letter
      Implement list union
      Square every element of a loop
      Get ASCII value of a character
      Implement course registration system using list comprehensions
      Convert String to Integer
      Convert every character of string to uppercase
      Implement map function
      Get all odd numbers from list of integers
      Get all even numbers from list of integers
      Implement filter function
      implement intersection of two lists
      Get the first element of a list (or) string
      get last element of a list (or) string
      Get tail of the list (or) string
      Return all the elements of a list except the last one
      Get all divisors of a number
      Decompose a list into (head, tail)
      Check whether list is empty (or) not
      Reverse list
      Find maximum in list of numbers
      Find minimum in list of numbers
      Convert every character in string to uppercase and remove any digits in it
      get maximum and minimum in list of numbers
      Implement intersperse function
      Return numbers from x to y
      Check whether two strings are equal or not
      Calculate simple interest
      Convert every character in string to uppercase
      Quick sort program
      Divide list to two sub lists
      Take a list and print their position
      Get the cross product of two lists
      Generate multiplication table of a number
      Get all the names from list, that start with character ‘S’
      Double all odd numbers in a list
      Get all even numbers which are greater than 6
      Get all the first elements of list of tuples
      Get all the second elements of list of tuples
      Convert list of words to a sentence
      Convert list of words to a sentence in upper case
      Repeat every character in a string 5 times
      Convert character to string
      Check whether all the elements in the list are odd or not
      Calculate sum of numbers in a string
      Design Employee utility for an organization
      Fibonacci series
      Check whether list is sorted or not.
      Get all digits in given string
      Check whether all the elements in a list are even (or) not.
      Implement Ackermann function
      Process list of tuples
      Check list of tuples has same elements or not.
      Square every element of list and then reverse
      Square every element of list and then sort
      Sort elements of list of string by their length.
      Group list of names using their length
      Group list of tuples by using first element
      Group list of tuples by using second element
      Group list of tuples by using first element, sort the second list of grouped elements
      Map employee ids to names
      Convert list of a to list of IO a
      Convert list to set
      Convert set to list
       Implement Exclusive or operation
      Get the maximum in three numbers
      Get the unicode distance between two characters
      Design deck of cards
      Get the unicode distance between two characters

Previous                                                 Next                                                 Home

No comments:

Post a Comment