---
title: "Discussion on \"Check If an Array is a Subset of Another Array\" | Hashnode"
description: "Discussion on \"Check If an Array is a Subset of Another Array\". Which technique works better? HashMaps or Sorting+Two-pointer"
url: "https://hashnode.com/posts/check-if-an-array-is-a-subset-of-another-array/67a4b6153862be0da63623e5"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Check If an Array is a Subset of Another Array](https://harshitawrites.hashnode.dev/check-if-an-array-is-a-subset-of-another-array?utm_source=hashnode&utm_medium=feed)

Which technique works better? HashMaps or Sorting+Two-pointer

Feb 6, 2025 · 3 min read · harshitawrites.hashnode.dev  
Read the article

-   [#dsa](https://hashnode.com/tag/dsa)
-   [#dsainjava](https://hashnode.com/tag/dsainjava)
-   [#subsets](https://hashnode.com/tag/subsets)
-   [#arrays](https://hashnode.com/tag/arrays)

## Written by

[Harshita Sharma](https://hashnode.com/@harshitawrites)

@harshitawrites · India

  
[View profile](https://hashnode.com/@harshitawrites)

Reading.Learning.Growing

Learning to build AI applications.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
