brick sort