LeetCode solutions

3066. Create a New Column

My accepted Python solution to LeetCode problem 3066, Create a New Column, running in 368ms.

  • Difficulty: Easy
  • Python
  • Runtime 368ms
  • Memory 66.3MB

Read the problem on LeetCode View on GitHub

Python

Accepted on LeetCode — runtime 368ms, memory 66.3MB, accepted 2026-01-02.

python
import pandas as pd

def createBonusColumn(employees: pd.DataFrame) -> pd.DataFrame:
    employees['bonus'] = employees['salary'] * 2
    return employees

Source