Skip to content

Mogby/DataStructure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DataStructure

Just another homework project.

This one provides an implementation of a data structure, that, given an array of N elements, can do the following in O(log n):

  1. Find the sum of all elements on a segment [l..r]
  2. Insert element x on position i
  3. Erase element on position i
  4. Assign the value of x to all elements on a segment [l..r]
  5. Add the value of x to all elements on a segment [l..r]
  6. Perform next_permutation on a segment [l..r]
  7. Perform prev_permutation on a segment [l..r]

Building

Create project file with cmake and then build it with your favorite build system.

You can build the whole project with tests or just the library (the data_structure target).

MOST LIKELY YOU'LL HAVE TO REBUILD GOOGLE TEST FOR YOUR SYSTEM AND EDIT CMakeLists.txt TO MATCH NEW FILES

About

Another homework.

Resources

License

MIT, BSD-3-Clause licenses found

Licenses found

MIT
LICENSE
BSD-3-Clause
LICENSE.GoogleTest

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages