Skip to content

This is a repository for all the problems I have solved regarding data structures.(array, linkedList, stack, queue, tree) This covers all the basics in manipulating data structures.

Notifications You must be signed in to change notification settings

fahimSiam/Date-Structures-Arrays-Singly-linkedlist-Python

Repository files navigation

Date Structures Array's and Signly Linked linkedlist Python

This is a repository for all the problems I have solved regarding data structures linear and circular Arrays and singly linked linkedlist in python. This covers all the basics in manipulating arrays. the array and singly linked linkedlist manipulation has been done in python but all the other data- structure coding has been done in java in a different "Data- Structures-Java repository. this is a repository of all my assignments in CSE220(DATA STRUCTURES). THESE ARE THE TASKS DESCRIPTION:

  1. Shift Left k Cells

  2. Rotate Left k cells

  3. Remove an element from an array

  4. Remove all occurrences of a particular element from an array

  5. Splitting an Array

  6. Array series: Write a method that takes an integer value n as a parameter. Inside the method, you should create an array of length squared (n*n) and fill the array with the following pattern. Return the array at the end and print it. If, n=2: { 0,1, 2,1 } (spaces have been added to show two distinct groups). n=3 : { 0, 0, 1, 0, 2, 1, 3, 2, 1 } ((spaces have been added to show three distinct groups). n=4 : {0, 0, 0, 1, 0, 0, 2, 1, 0, 3, 2, 1, 4, 3, 2, 1} (spaces have been added to show four distinct groups).

  7. Max Bunch Count: A "bunch" in an array is a consecutive chain of two or more adjacent elements of the same value. Write a method that returns the number of elements in the largest bunch found in the given array. Input: [1, 2, 2, 3, 4, 4, 4] Output: 3 Explanation: There are two bunches here {2,2} and {4,4,4}. The largest bunch is {4,4,4} containing 3 elements so 3 is returned

  8. Repetition Circular Array:

  9. Palindrome

  10. Intersection Write a method/function that takes two circular arrays, their sizes and start indexes and returns a linear array containing the common elements between the two circular arrays. Input: Circular array 1 : [40,50,0,0,0,10,20,30] (start_1 =5, size_1 =5) [10 20 30 40 50] Circular array 2 : [10,20,5,0,0,0,0,0,5,40,15,25] (start_2=8, size_2 =7) [5 40 15 25 10 20 5] Output: [10,20,40]

About

This is a repository for all the problems I have solved regarding data structures.(array, linkedList, stack, queue, tree) This covers all the basics in manipulating data structures.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages