Instruction: Describe how you would implement a genetic algorithm in R for solving optimization problems.
Context: This question tests the candidate's ability to apply bio-inspired algorithms to solve complex optimization problems using R.
medium
hard