Data Structure Operations in Hindi

Data Structure Operations in Hindi

Data Structure Operations क्या हैं?

किसी data structure की सहायता से व्यवस्थित व संग्रहित किए गए data list पर processing करने के लिए हमें इस पर विभिन्न प्रकार के operations करने की आवश्यकता पड़ती है। इनमें से प्रमुख operation निम्नलिखित है:

Data Structure Operations in Hindi

इनमें से प्रमुख operation निम्नलिखित है:

  • Traversing 
  • Insertion
  • Deletion
  • Searching
  • Sorting 
  • Merging

1. Traversing:

किसी data list के प्रत्येक data item को access कर उसे process करना traversing कहलाता है। इसे visiting भी कहते हैं। इसमें data list को store करने के लिए array अथवा linked list का प्रयोग किया जाता है। Traversing की प्रक्रिया में data list के प्रथम item से लेकर इसके अंतिम item तक के सारे item को एक के बाद एक केवल एक बार access व process किया जाता है। 

Traversing सभी प्रकार के data structure operations में सबसे आधारभूत एवं सबसे ज्यादा किया जाने वाला operation होता है। समान्यतः data structure में कोई भी operation करने से पहले हमें सम्पूर्ण data structure या इसके कुछ भाग पर traversing करने की जरूरत पड़ती है।

उदाहरण: Read, Write, Update, Compare आदि।

2. Insertion:

किसी data list में कोई नया data item जोड़ना insertion कहलाता है। इसमें data list को store करने के लिए array अथवा linked list का प्रयोग किया जाता है। data list में नया item निम्नलिखित तीन प्रकार से जोड़ा जा सकता है:

  1. Data List की शुरुआत में (At the beginning of the list)
  2. Data List के अंत में (At the end of the list)
  3. Data List के मध्य में किसी स्थान में (At the middle of the list anywhere)

3. Deletion:

किसी data list से कोई पुराना data item हटाना deletion कहलाता है। इसमें data list को store करने के लिए array अथवा linked list का प्रयोग किया जाता है। Data List से पुराना item निम्नलिखित तीन प्रकार से हटाया जा सकता है:

  1. Data List की शुरुआत से (Form the beginning of the list)
  2. Data List के अंत से(From the end of the list)
  3. Data List के मध्य में किसी स्थान में (From the middle of the list anywhere)

4. Searching:

किसी data list किसी data item की उपस्थिति का पता लगाना एवं उसके location को ज्ञात करना searching कहलाता है। इसमें data list को store करने के लिए array अथवा linked list का प्रयोग किया जाता है। Data List में से जिस item को search करना होता है उसे search key कहते हैं। Searching की प्रमुख विधियाँ निम्नलिखित है:

  1. Linear Search
  2. Binary Search

5. Sorting:

किसी data list के सभी data item को बढ़ते क्रम (ascending order) या घटते क्रम (descending order) में व्यवस्थित (arrange) करना sorting कहलाता है। इसमें data list को store करने के लिए array अथवा linked list का प्रयोग किया जाता है। Sorting की प्रमुख विधियां निम्नलिखित है:

  1. Selecting sort
  2. Bubble Sort
  3. Insertion Sort
  4. Quick Sort

6. Merging:

किन्ही दो data list को मिलाकर एक नया data बनाना merging कहलाता है। इसमें data list को store करने के लिए array अथवा linked list का प्रयोग किया जाता है। Merging के लिए दोनों data list में items की संख्या समान या असमान हो सकता है लेकिन merging के बाद बनने वाले नए data list में items की सख्या दोनों data list के items की संख्या के बराबर होता है।

Operations in One Dimensional Array: Traversal, Insertion, and Deletion

Traversal:

Linear Array में traversal करना बहुत आसान होता है। इसके लिए हम एक counter लेते हैं और उसे array के lower bound (first element) पर set करते हैं। फिर lower bound के element को access व process कर counter को next element पर set करते हैं और इसी प्रक्रिया को array के upper bound (last element) तक करते चले जाते हैं।

ARRAY TRAVERSE (LA, LB, UB, C)

Here LA is a linear array with lower (LB) and upper bound (UB). This Algorithm traverses LA writing all elements one by one.

Step1: C←LB    

Step2: Repeat step 3 and 4 Until C<=UB

Step3: Write: LA[C]

Step4: C←C+1

Step5: Exit

Insertion;

Linear Array में नया element कराना बहुत आसान होता है। इसके लिये हम एक counter लेते और उसको array के अंतिम element पर set करते हैं। फिर अंतिम element को अपने स्थान से एक स्थान downward move करते हैं व counter को previous element पर set करते हैं और इसी प्रक्रिया को तब तक करते चले जाते हैं। 

जब तक नया element को insert कराने के लिए चाहा गया स्थान खाली न हो जाए। अंत मे खाली हुई स्थान पर नए element को insert कराते हैं और array में elements की कुल संख्या को reset कर देते हैं।

ARRAY INSERT (LA, N, P, E, C)

Here LA is a linear array with N elements and P is a positive integer such that P<=N This algorithm inserts an element E into position P of LA.

Step1: C←N

Step2: Repeat step 3 and 4 Until C>=P

Step3: LA[C+1]←LA[C]

Step4: C←C-1

Step5: LA[P]←E

Step6: N←N+1

Step7: Exit

Insertion Operations in Hindi

Deletion:

Linear Array से पुराने element को delete करना बहुत आसान होता है। इसके लिए हम एक counter लेते हैं और उसे उस स्थान पर set करते हैं जहाँ से element को delete कराना चाहते हैं। फिर उस स्थान के बाद वाले element को अपने स्थान से एक स्थान upward move करते हैं जिससे चाहा गया element overwrite होकर delete हो जाता है और counter को next element पर set कर इसी प्रक्रिया को array के अंतिम element तक करते चले जाते हैं। शुरुआत में ही delete किए जाने वाले element को एक variable में store कर ले रहते हैं और अंत मे array में elements की कुल संख्या को reset कर लेते हैं।

ARRAY INSERT (LA, N, P, E, C)

Here LA is a linear array with N elements and P is a positive integer such that P<=N This algorithm deletes an element E from position P of LA.

Step1: E←LA[P]

Step2: C←P

Step3: Repeat step 4 and 5 Until C<N

Step4: LA[C]←LA[C+1]

Step5: C←C+1

Step6: N←N+1

Step7: Exit

Deletion Operations in Hindi

Data Structure Operations in Hindi

Friends मुझे पूरी उम्मीद है कि ये पोस्ट आपको जरूर पसंद आई होगी और मुझे खुसी है कि मैं आपके लिए कुछ का जानकारी इस ब्लॉग के माध्यम से दे सका और इसी प्रकार किसी बारे में जानकारियां प्राप्त करना हैं तो इसके लिए आप comment box के माध्यम से दे सकते हैं Post अच्छी लगी तो इसे दोस्तो के Share जरूर करें धन्यवाद।

2 thoughts on “Data Structure Operations in Hindi”

Leave a Comment