Recently I came across a question,  There is an unsorted array of n elements. Once we sort the array, i th index will have an element. How would you find which element is going to be present on i th index in O(n) complexity on the unsorted array?  I tried many methods, finally I came to a conclusion that we may need to use an hash map. But later I found that hash map implementation usually follow a tree structure which has an log n complexity in insertion.  How shall I proceed?
I believe there's a way to find the kth largest element in an unsorted array of length n in O(n).  Or perhaps it's "expected" O(n) or something.  How can we do this?
Which creatures in Tolkien's literature can be female? I know that to better balance paragon and epic level players against similar level monsters, WotC changed the math used for monsters for MM3, and I believe that they changed some of the types of powers they gave monsters.   If I want to update monsters from MM1 or MM2 to be in line with MM3 era monsters, what changes should I make? Is there any possibility to find my father's lost iPhone? My father has lost his iPhone 6 which was not signed in using an iCloud account. Is there any possibility it can be found? Topology: Proof that a finitely generated cone is closed plist or sqlite What is duplicate content and how can I avoid being penalized for it on my site? This is a general, community wiki question regarding duplicate content.  If your question was closed as a duplicate of this question and you feel that the information provided here does not provide a sufficient answer, please open a discussion on .     What does Google consider to be duplicate content? Will the way I am presenting my content result in a duplicate content penalty? How can I avoid having my site's content treated as duplicate content? Are nuclear weapons simply non-existent in the Star Wars universe? The resistance is attacks the Starkiller Base with what appears to be pretty small time ammunition even by modern earth missiles, which requires a long running sequence of repeated flybys.  The objective, IIRC was to destroy a critical piece of machinery on the surface which would then destabilize the entire planet/weapon (feel free to correct in edit if I remember incorrectly).  OK cool, but then why the force wouldn't they just drop a nuclear bomb on it?  Have nuclear weapons been used any other time in Star Wars (including EU), or, like smart phones, have they just not been invented in that world? Why are springs shaped the way they are? Why are springs coiled the way they are? Why not some other shape? Is the shape due to its elasticity or something? How to allow certain html tags? I already have a 6 month valid UK business visa received prior to April 24 2015. I was supposed to travel to the UK in April, but my trip was cancelled on medical grounds.  I am now planning to visit the UK in July for tourism. Would it be fine for me to do so? Will I be allowed to enter the UK? Should I carry the original invite letter and medical certificate to prove why I didn't go the first time? Footnote citations in biblatex ignore spacing before the citation command; how can I have the same behavior for all footnotes in a document?  Here's a MWE demonstrating the issue:  \documentclass{article} \usepackage[style=verbose-trad2]{biblatex} \addbibresource{biblatex-examples.bib} \begin{document} Spacing is fine before citations     \autocite{kant:kpv}  but not before footnotes    \footnote{A footnote \autocite{kant:ku}}. \end{document} $2\times2$ matrix $A$ such that $A$ has one independent eigenvector while $A^{2}$ has two independent eigenvectors Is there a location where I can drop in a custom JavaScript file in Drupal 7.x?  It just includes simple event actions for menus, and I don't want to edit the theme/module files.  Or do I have to just add the "include" hook to the theme/module? Laravel - Populating Select List with Derived Values What is the type of string literals in C and C++? How can I retrieve data within my widget I have a Widget which I am creating but my quesiton is how do I access my custom table which I created via my plugin. I am attempting to fill the dropdown from the table called tfp which contains the column liters which I wish to popluate the values into the drop down   class my_plugin extends WP_Widget {  // constructor function my_plugin() {         parent::WP_Widget(false, $name = __('Thomsons Fuels Widget', 'wp_widget_plugin') );  }  // widget form creation function form($instance) {  //Check values if( $instance) {  $title = esc_attr($instance['title']);  $dropdown= esc_attr($instance['dropdown']);  $textarea = $instance['textarea'];  } else {  $title = '';  $textarea = ''; } ?&gt;   &lt;p&gt; &lt;label for="&lt;?php echo $this-&gt;get_field_id('dropdown'); ?&gt;"&gt; &lt;?php _e('Liters',   'wp_widget_plugin'); ?&gt;&lt;/label&gt; &lt;select&gt; &lt;option value="volvo"&gt;Volvo&lt;/option&gt; &lt;/select&gt;  &lt;/p&gt;   How I created the table in the plugin   global $wpdb; global $custom_table_example_db_version;  $table_name = $wpdb-&gt;prefix . 'tfp'; // do not forget about tables prefix  // sql to create your table // NOTICE that: // 1. each field MUST be in separate line // 2. There must be two spaces between PRIMARY KEY and its name //    Like this: PRIMARY KEY[space][space](id) // otherwise dbDelta will not work $sql = "CREATE TABLE " . $table_name . " (   id int(11) NOT NULL AUTO_INCREMENT,   liters VARCHAR(100) NOT NULL,   price VARCHAR(100) NOT NULL,      postcodearea varchar(20) NULL,         dft varchar(20) NULL,   PRIMARY KEY  (id) );";  // we do not execute sql directly // we are calling dbDelta which cant migrate database require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); dbDelta($sql);  // save current database version for later use (on upgrade) add_option('custom_table_example_db_version', $custom_table_example_db_version); How do some Ws on transcripts affect PhD admissions in mathematics? How do I get to Orgrimmar from Silvermoon City at level 11? I have a level 11 Blood Elf and want to spend some of my honor points. I've heard that I could spend them in Orgrimmar, but the only problem is getting there.  How do I get to Orgrimmar from Silvermoon City? I'm not in a level 25 guild, so nobody can teleport me there. :( Is there a platform-agnostic and filesystem-agnostic method to obtain the full path of the directory from where a program is running using C/C++? Not to be confused with the current working directory. (Please don't suggest libraries unless they're standard ones like clib or STL.)  (If there's no platform/filesystem-agnostic method, suggestions that work in Windows and Linux for specific filesystems are welcome too.) I have just created a Minecraft 1.13.1 server and was wondering if there was any way to give everyone the teleport command even if they are not op. If not, is there a way that I could make them op but only have access to the teleport command?