470,590 Members | 1,856 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,590 developers. It's quick & easy.

How would unencapsulate an unsorted array structure’s fetch algorithm?

74 64KB
Here is a sample of my code to help better understand the question. Any suggestions would be nice. When it says unencapsulate the structure, does it mean that I will reveal the implementation details of the deepCopy() method. Referring to specifically line 7 as the question in hand which is return data[i].deepCopy(); Here is partial code below:

Expand|Select|Wrap|Line Numbers
  1. //access the node (assumes the node is in the structure)
  2. i=0;
  3. while(targetKey!=data[i].key()){
  4. i++
  5. }
  7. // return a a copy of the node to the client 
  8. return data[i].deepCopy();
Sep 16 '17 #1
0 3813

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by siliconmike | last post: by
7 posts views Thread by ritchie | last post: by
3 posts views Thread by ritchie | last post: by
10 posts views Thread by padh.ayo | last post: by
2 posts views Thread by richie | last post: by
29 posts views Thread by Mik0b0 | last post: by
4 posts views Thread by yogi_bear_79 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.