This phase II trial studies how well giving dabrafenib alone and in combination with trametinib before surgery works in treating patients with advanced melanoma that can be removed by surgery. Studying samples of tumor tissue in the laboratory from patients receiving dabrafenib and trametinib may help doctors learn more about the effects of these drugs on cells and help identify biomarkers that determine which patients will respond to these drugs best.