Git Product home page Git Product logo

data-structure's Introduction

Data structure

Introduction

This topic is going to introduce some basic data structure and its operation. Also, I'll using class to write the structure and hoping to make them to be ADT(Not all).

Table of Contents

  1. Array ADT
  2. String

Array ADT

In this class, I use the interger array. You can change the class into any template you want!

Table for function

Constructor

  1. Array

  2. ~Array

Set or get element

  1. getSize()
  2. setSize()
  3. getLength()
  4. setLength
  5. setElement()
  6. getElement()

Add or delete element

  1. append()

  2. insert()

  3. del()

  4. insertSort()

Search or find the element

  1. linearSearch()

  2. binarySearch()

  3. recursionBinarySearch()

  4. findMax()

  5. findMin()

Function for decide the condition

  1. isSorted()

Get the specific element

  1. getSum()
  2. getAvg()

Special function arrange the array

  1. reverse()
  2. rearrange()
  3. mergingSort()

IO stream using overloading

  1. ostream
  2. istream

Set operation

  1. Union()
  2. Intersect()
  3. Diff()

String

In the String class, I didn't use lots of operation. Instead, I add lots of special function for fun!

Table for function

Constructor and destructor

  1. String()
  2. ~String()

Getter function

  1. getLength()

Case function

  1. toUpper()
  2. toLower()
  3. toggleCase()

Conditional function

  1. compare()

  2. checkvalid()

  3. isPalindram()

  4. findDuplicate()

    Using array

  5. findDuplicateBitwise()

    Using Bitwise Operation

  6. checkAnagram()

Reverse and find permutaion

  1. reverse()

  2. permuationWithStatic()

    Using static

  3. permutationWithSwap()

    Using swap

Ostream overloading

  1. ostream

data-structure's People

Contributors

justin900429 avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.