Skip to content

This repo contains C++ files that i am writing in my way of learning DSA.

Notifications You must be signed in to change notification settings

somnathPrasad/cpp

Repository files navigation

cpp

This repo will contain all types of c++ questions

earray

earray is a c++ header file that uses a class to provide a dynamic integer array that can resize itself just like vectors.

functions declared inside earray:

  • array.print() : prints the whole array.

  • array.pushBack() : add a new item in the end of the array.

  • array.isEmpty() : returns 1 if the array is empty else -1.

  • array.insert() : insert the item in the provided index.

  • array.indexOf() : return the index of the provided item.

  • array.contains() : returns true if the item is in the array.

  • array.prepend() : insets the item in the start of the array.

  • array.pop() : delets 1 item from the end.

  • array.deleteAt() : deletes the item in the provided index.

  • array.remove() : delete the item from the array.

  • array.find() : returns the index of the item if found else returns -1.

  • array.length : returns the length of the array.

  • array.at() : returns the item at the given index.

How to use this

1. download earray file.

2. place it in the same folder in which you are working.

3. use #include"earray.h" to include this file.

i know the algorithms in this file is not up to the mark, but i am learning so wish me luck.

About

This repo contains C++ files that i am writing in my way of learning DSA.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages