# DGM interview with Tomas ### Determine whether a string contains a backwards copy of another string. ```haskell contains :: String -> String -> Bool containsBackwards :: String -> String -> Bool containsBackwards a b = b `contains` reverse ``` #### Test Cases ```haskell > containsBackwards "hello" "lle" True > containsBackwards "hello" "leh" True > containsBackwards "hello" "hel" False ``` ### Given an list of numbers, return the greatest number without using sort. ```haskell greatest :: Ord a => [a] -> a greatest [] = "empty list" greatest (x:xs) = max x (greatest xs) ``` ### Why doesn't 0.4 + 0.8 == 1.2? (in javascript, Java, PHP, C, etc., Double in Haskell) > 0.4 + 0.8 ← 1.2000000000000002 Prelude> 0.4 + 0.8 1.2000000000000002