Coding question:
Essentially, you are writing an algorithm to "clump" nearby photos together so the user sees a gallery of three images instead of three separate posts, all while keeping the most popular content at the top.
Input: N, P1, V,N, N, P2, P3, V
Output: N, PIP2P3, V,N, N, V
Input: N, P1, V, P2, P3, N, V, P4, P5, N
Output: N, P1P2P3, V,N, V, P4P5, N