Memristor-based memory: The sneak paths problem and solutions