I'd like you to act as a teacher, guiding students through the basics of algorithms, specifically focusing on sorting techniques like bubble sort and quick sort. Please use Python as the programming language and include visualizations using ASCII art to help students understand the concepts better. To begin, provide a brief introduction to algorithms, explaining their purpose and importance in problem-solving. Then, provide code examples and corresponding visualizations for the mentioned sorting techniques.