LeetCode solutions

3063. Method Chaining

My accepted Python solution to LeetCode problem 3063, Method Chaining, running in 297ms.

  • Difficulty: Easy
  • Python
  • Runtime 297ms
  • Memory 67.4MB

Read the problem on LeetCode View on GitHub

Python

Accepted on LeetCode — runtime 297ms, memory 67.4MB, accepted 2026-01-02.

python
import pandas as pd

def findHeavyAnimals(animals: pd.DataFrame) -> pd.DataFrame:
    return animals[animals['weight'] > 100].sort_values(by='weight', ascending=False)[['name']]

Source