What are the advantages a Linked-List implementation of a List has over an Array-based implementation of an array and vice-verse?  For starters I know that linked-list uses up more space than an array because it has to use the extra 4 bytes of space to hold a reference to the next node and an array doesn't have to do that. So array uses less space.  Advantage linked-list has over an array implementation is that array has a fixed size at initialization and you have to write code to increase the size of the array so that may be a disadvantage when compared to linked-list implementation.   Any ideas on anything else for advantage-disadvantage?
I use a lot of lists and arrays but I have yet to come across a scenario in which the array list couldn't be used just as easily as, if not easier than, the linked list.  I was hoping someone could give me some examples of when the linked list is notably better.
Why the $(n+1)$th prime number cannot exceed the smallest prime divisor of $p_1\dotsc p_n + 1$ Let $p_n$ be the $n$th prime number in its natural order. We want to show that  $$p_{n+1} \leq p_1\dotsc p_n + 1 \tag{1}$$  I know $p_1\dotsc p_n + 1 &gt; 1$, so it has at least one prime divisor, but the text says that $p_{n+1}$ cannot exceed the smallest of these divisors, but I cannot understand why, especially when I imagine $p_{n+1}$ being very large. Although some examples confirm that this statement is true, I cannot make a connection as to why the $n+1$ prime number cannot exceed the smallest prime divisor. Once this has been shown to be true, $(1)$ immediately follows. I'm using Ubuntu 11.04 and I want to free up some space in my root directory, which is overloaded. I especially want to change the path used for installing applications (they are getting installed directly to the root drive).  Another consideration is that I'm working on a MySQL database server. The server is installed in the root directory itself, so I don't want to  risk losing any data.  Please give me some tips to help sort out this problem. How to open a web page from my application? 'sudo' not working after changing the permissions of '/usr' directory Recently I had to change the folder permissions of /usr folder. Now the whole sudo is not working. If I try to update my system using this command:  sudo apt-get update   I get the following message:  sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner sudo: fatal error, unable to load plugins   So I tried to change the folder permissions by opening Nautilus as root by using this command  gksudo nautilus   But nothing happened. Nautilus didn't open. This is an emergency as the whole of sudo is not working. when I tried searching the solution from Google many suggested re-installation. I don't prefer re-installation. so is there any other solution? I wanted to tidy up a TeX document and was curious if you can use \lstinputlisting or a similar function to include a certain part of a source-code file.  Example, I have a 500 or so line source file and I want to include just lines 300-400.  Is there a way to do this? What do I if I used "Reset All" or "Erase All Content and Settings" on a jailbroken iOS Device? I recently received an iOS device and it was jailbroken. When I wanted to unjailbreak it, I used "Erase All Content and Settings." The loading screen came on and it has not changed. After rebooting the device, it is now stuck at the Apple logo. What should I do? Let $f$ be a function of bounded variation on $[0,1]$. Let $\{[a_n,b_n]\}_{n=1}^\infty$  such that $(a_n,b_n)$ are pairwise disjoint and $\cup_{n=1}^\infty [a_n,b_n]=[0,1]$. (for example, $[1/2, 1], [0,1/3], [1/3,1/3+1/3^2], \cdots$ ) Can we write  $$ \operatorname{Var}_{[0,1]} f=\sum_{k=1}^\infty \operatorname{Var}_{[a_k,b_k]} f? $$ Clipboard for copying and pasting files in command line? In Bash, suppose I visit a directory, and then another directory. I would like to copy a file from the first directory to the second directory, but without specifying the long pathnames of them. Is it possible?   My temporary solution is to use /tmp as a temporary place to store a copy of the file. cp myfile /tmp when I am in the first directory, and then cp /tmp/myfile . when I am in the second directory. But I may check if the file will overwrite anything in /tmp.  Is there something similar to a clipboard for copying and pasting a file? I used to have an icon on the Windows Vista taskbar showing the battery amount remaining (laptop). It has mysteriously vanished.  How can I get it back?  I followed the Windows  (see How can I hide the battery icon in the notification area? - hoping to reverse the instructions) but the Power checkbox on the Notification Area tab was greyed out and could not be checked or unchecked (it is currently unchecked). What's the best way to take a picture of an LCD or CRT screen? I have seen many bad pictures of LCD and CRT screens. How do I get a good picture of an LCD or CRT screen? I committed and joined  in private beta. As per private beta privilege page casting close and reopen votes requires only 1 reputation. So anyone is able to access close votes and reopen votes review queues. But there is no link of the review page in the top bar or anywhere. So I thought I am not able to access any review queue. I opened the review page by typing the URL manually (to see review statistics for curiosity). But I found that I can access close &amp; reopen votes review queues.        Probably I won't be able to access any review queue if I have less than 350 and the site goes to public beta. But during private beta off topics, unclear, or closable questions are likely to come. So it is very important to close/reopen them during private beta.  So can we please add the "review" link in the top bar if I am able to review some queues? Is there a quick proof as to why the vector space of $\mathbb{R}$ over $\mathbb{Q}$ is infinite-dimensional? It would seem that one way of proving this would be to show the existence of non-algebraic numbers. Is there a simpler way to show this? What Happens to electrons after Alpha Decay and Nuclear Fission? Summing a series having a geometric component Unable to see anything after importing .obj file In reading through the original GCM specification (), the composition of the 128 bit Initialization Vector as a concatenation of a 96b nonce and a 32b unsigned wrapping counter seems arbitrary and forces the scrambling pattern to repeat every 232 16-byte block.  Is the algorithm expected to be secure for significantly longer stream lengths if for example the IV were a 128b nonce XORed with a 64b or 128b counter, or are there known cryptanalysis issues that begin to arise? Im trying to solve the following question         In the second step  where do they get $k!=2^k-1?$ What causes 5 pink bars on 27" iMac (2011)? I've got a 27 inch iMac made in 2011 that displays 5 pink vertical bars on the screen. It won't boot properly. I ran the Apple Hardware Test and it came up clean.   Machine Specs:  Apple Subfamily:    Mid-2011  Apple Model No: A1312 (EMC 2429) Model ID:   iMac12,2 How can I pad an integer with zeros on the left? How do you left pad an int with zeros when converting to a String in java?  I'm basically looking to pad out integers up to 9999 with leading zeros (e.g. 1 = 0001). Lighter nuclei liberate energy when undergoing fusion, heavier nuclei when undergoing fission.  What is it about the nucleus of an Iron atom that makes it so stable?  Alternatively: Iron has the greatest nuclear binding energy - but why?