sedgewick exercises matrix