Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

what data is preferred?

$
0
0

Implement a data structure (of N strings) using an dynamic array to support the followings • Satellite data are of string type • O(logN) time Addition(string X) // If X is in the DS then increment its counter • O(k.logN) time to find kth element in dictionary/lexicographic order in entire data • O(log N) time to find number of occurrence of an element (X) • TotalSize() in O(1) time Use of dynamic array is mandatory Use of inbuilt functions of C++ STL are not allowed You may use any functions of <string.h> or <cstring> : Allowed Use of self referential structure are not allowed (e.g. struct node {struct node *next;}).


Viewing all articles
Browse latest Browse all 39796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>