F5 Networks Interview Question for Software Engineer / Developers






Comment hidden because of low score. Click to expand.
0
of 0 vote

Hash tables have high insertion complexity but other operations are constant time depending on the hash function. hashmaps or unordered are implemented using this.
RBTrees is the widely used balanced binary tree which has logn for all operations. and not so easy to implement. Maps are implemented using this structure
So it depends on the application, if you know approx. what the size of your data would be then hashmaps are the best if not you need to choose.
An easier alternative to RBTrees are skip lists which are much easier to implement but same performance.
anyways, please reply your perspective on this problem. Thanks

- chennavarri November 11, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Depending on the hash function hash tables can have a constant time complexity for insertion.

- Gabriel November 18, 2010 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

Algorithm :The buckets array may have to be resized dynamically when a certain load factor is reached.the tree need to be balanced.
C++ STL Implementations:std::unordered_map,std::unordered_set for hashes and std::map for trees
Sorting:No in hashes Yes in Tree
Range Search :"
Runtime Complexity :Inserting: O(1) (normal case), O(N) (worst case, only with bad hash algorithm)
Searching: O(1) (normal case), O(N) (worst case, only with bad hash algorithm).
Inserting: O(log(n)) (when balanced)
Searching: O(log(n)) (when balanced)

- adhi March 16, 2011 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More