Your question is Deploy Configs Across Namespaces. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Given a configuration payload represented as a JSON string and a list of Kubernetes namespace names, write a function that returns an ordered deployment plan. Each config object contains name, version, and content. For every namespace, include one deployment action per unique (name, version) pair, keeping only the last occurrence from the input JSON while preserving the final effective order.
name, version, and contentValueErrordef build_deployment_plan(namespaces, config_json):