What contributed to the implementation of Jim Crow laws?

-the presidential election of 1872
-passage of the Fourteenth Amendment
-the end of Reconstruction
-repeal of Black Code law