Consider two lists: $(1,2,\dots,n)$ and $(a_1,a_2,\dots,a_n)$, where the second list is a permutation of the first. Does there exist a constant $c$ such that for any $n$ and for any second list, we can choose a subset $A\subseteq\{1,2,\dots,n\}$ of size at most $n/2+c$ so that for any prefix and suffix of either list of any length $k\in[1,n]$, at least $k/2$ of those elements are in $A$?
The $n/2$ part is necessary: even if we just have the list $(1,2,\dots,n)$ and require the condition on the prefix, when taking $k=n$ we already need to include at least $n/2$ elements. If we only want the prefixes and suffixes of the first list, we can choose $A=\{1,3,5,\dots\}$ along with $n$ (if not already included), which comes to at most $n/2+1$ elements.