One problem a day logo One problem a day
Browse problems
All problems 944 About this project

Categories

  • Array & Hashmap 217
  • Backtracking 33
  • Binary Search 27
  • Bit Manipulataion 25
  • Design 46
  • Dynamic Programming 85
  • Graph 74
  • Greedy 59
  • Heap 44
  • Intervals 16
  • Linked List 50
  • Math & Germetry 85
  • Queue 15
  • Sliding Window 29
  • Stack 48
  • Tree 122
  • Trie 14
  • Two Pointers 31

© 2026 One problem a day

Problems Detect capital
array and hashmap December 13, 2022

Detect capital

Time O(1) Space O(1) Open original problem

We can use python's built in fuction to check the conditions.

class Solution:
    def detectCapitalUse(self, word: str) -> bool:
        return word.isupper() or word.islower() or word.istitle()

Time complexity: O(1)
Space complexity: O(1)

Previous problem ← Increasing subsequences
Next problem Check whether two strings are almost equivalent →

On this page

Start typing to search all 944 problems.
↑↓ Navigate ↵ Open Powered by Fuse.js