Math 2469. Convert the Temperature¶ Time: $O(1)$ Space: $O(1)$ C++JavaPython 1 2 3 4 5 6class Solution { public: vector<double> convertTemperature(double celsius) { return {celsius + 273.15, celsius * 1.8 + 32}; } }; 1 2 3 4 5class Solution { public double[] convertTemperature(double celsius) { return new double[] {celsius + 273.15, celsius * 1.8 + 32}; } } 1 2 3class Solution: def convertTemperature(self, celsius: float) -> list[float]: return [celsius + 273.15, celsius * 1.8 + 32] Was this page helpful? Thanks for your feedback! Thanks for your feedback! Help us improve this page by using our feedback form.