Skip to content

[LeetCode] #706. Design HashMap (HashMap, Easy) #47

@Cheolsker

Description

@Cheolsker

제한사항

  • 0 <= key, value <= 10^6
  • At most 10^4 calls will be made to put, get, and remove.

아이디어

  1. hashKey를 key % 사이즈로 계산하고, 해시 충돌 시 연결 리스트로 관리
    a. 해시맵에 put, get, remove 메소드를 구현하는 문제
    b. 각각 최초 hashKey로 bucket에 접근해서 값이 있는지 찾기
    c. 연결 리스트 존재 시, 순회하여 값을 찾아서 메소드 기능 수행

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions