Skip to content

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages