---
title: "NSSet vs NSMutableSet class"  
description: "NSSet vs NSMutableSet class"  
author: "Tarun Kumar"  
published: 2015-11-18  
updated: 2020-09-23  
canonical: https://www.mindstick.com/interview/22905/nsset-vs-nsmutableset-class  
category: "iphone"  
tags: ["iphone", "ios", "objective c"]  
reading_time: 1 minute  

---

# NSSet vs NSMutableSet class

NSSet and NSMutableSet both classes stores unordered collection of distinct objects.

but In NSSet when we establish a static set's entries and when it's created, thereafter we can't modified the NSSet entries.

On the other hand NSMutableSet allows addition and deletion of entries at any time and also automatically allocating memory as needed.

## Answers

### Answer by Tarun Kumar

NSSet and NSMutableSet both classes stores unordered collection of distinct objects.

but In NSSet when we establish a static set's entries and when it's created, thereafter we can't modified the NSSet entries.

On the other hand NSMutableSet allows addition and deletion of entries at any time and also automatically allocating memory as needed.


---

Original Source: https://www.mindstick.com/interview/22905/nsset-vs-nsmutableset-class

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
