Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function that Search for the key of a certain object #7

Open
abdullahemad12 opened this issue Jun 27, 2018 · 0 comments
Open

Function that Search for the key of a certain object #7

abdullahemad12 opened this issue Jun 27, 2018 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@abdullahemad12
Copy link
Owner

abdullahemad12 commented Jun 27, 2018

Task

Write a function that, given a pointer to an object in the tree, returns the key of this object

Interface

/**
  *  cranbtree_t*, void* -> int
  * REQUIRES: the object to be already inserted in the tree
  * EFFECTS: Figures out the key of a given object in the tree
  * RETURNS: the key of the object, or -1 if the object was not found
  */
int cbt_key_search(cranbtree_t* cbt, void* object);

Stub

the stub for this function can be found at src/cranbtree.c

Testing

demonstrate that it works by writing tests

@abdullahemad12 abdullahemad12 added enhancement New feature or request help wanted Extra attention is needed labels Jun 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant