Algo Notes

Jun 12, 20261 mintechnical
  • Checking if a key is in a Python dictionary is O(1)O(1) on average.
    • Python dictionaries do not use chaining - they use open addressing with probing

General

  • isalnum is a standard library function in C (<ctype.h>) and a built-in method in Python (str.isalnum()) that checks if a character or string contains only alphanumeric characters (letters A-Z, a-z, and digits 0-9). It returns true/non-zero if all characters are alphanumeric, and false/zero otherwise.