text:
Display 2d array as ASCII table
The task is to display ascii table for a given array.
Input
The input is an 2D matrix. The matrix's row length is same with the length of an array. Alternatively, you can take input of an 2D matrix with the first row is a header. The outer dimension is the row.
Example Input:
[["License","2008-05-08","2009-03-11","2011-11-22","2013-08-12","2015-11-19"],["GPLv2","58.69%","52.2%","42.5%","33%","23%"],["GPLv3","1.64%","4.15%","6.5%","12%","9%"],["LGPL 2.1","11.39%","9.84%","?","6%","5%"],["LGPL 3.0","? (<0.64%)","0.37%","?","3%","2%"],["GPL family together","71.72% (+ <0.64%)","66.56%","?","54%","39%"]]

Output
The output of a table looks like below.
+---------------------+-------------------+------------+------------+------------+------------+
| License             | 2008-05-08        | 2009-03-11 | 2011-11-22 | 2013-08-12 | 2015-11-19 |
+---------------------+-------------------+------------+------------+------------+------------+
| GPLv2               | 58.69%            | 52.2%      | 42.5%      | 33%        | 23%        |
| GPLv3               | 1.64%             | 4.15%      | 6.5%       | 12%        | 9%         |
| LGPL 2.1            | 11.39%            | 9.84%      | ?          | 6%         | 5%         |
| LGPL 3.0            | ? (<0.64%)        | 0.37%      | ?          | 3%         | 2%         |
| GPL family together | 71.72% (+ <0.64%) | 66.56%     | ?          | 54%        | 39%        |
+---------------------+-------------------+------------+------------+------------+------------+

Each cell has exactly one space on the left and at least one space on the right, padded until the bars aligned. However, at least one cell has only one space on its right.
Test cases
Input:
[["Hello", "World", "!!!"],["aa", "bbbbbbbbb", "CcC"], ["Pyth",  "CJam", "GolfScript"]]

Output:
+-------+-----------+------------+
| Hello | World     | !!!        |
+-------+-----------+------------+
| aa    | bbbbbbbbb | CcC        |
| Pyth  | CJam      | GolfScript |
+-------+-----------+------------+

Example submission
function ascii_table(array, header) {
    var lengths = array[0].map(function(_, i) {
        var col = array.map(function(row) {
            if (row[i] != undefined) {
                return row[i].length;
            } else {
                return 0;
            }
        });
        return Math.max.apply(Math, col);
    });
    array = array.map(function(row) {
        return '| ' + row.map(function(item, i) {
            var size = item.length;
            if (size < lengths[i]) {
                item += new Array(lengths[i]-size+1).join(' ');
            }
            return item;
        }).join(' | ') + ' |';
    });
    var sep = '+' + lengths.map(function(length) {
        return new Array(length+3).join('-');
    }).join('+') + '+';
    if (header) {
        return sep + '\n' + array[0] + '\n' + sep + '\n' +
            array.slice(1).join('\n') + '\n' + sep;
    } else {
        return sep + '\n' + array.join('\n') + '\n' + sep;
    }
}

This is code-golf, so the submission with the least amount of bytes wins!

Looks like first answerer. Please, do not use example-of-solution.

@ChristianIrwan deleted.

Don't delete, I will try to figure out the challenge.

You have enough reputation to be on chat. Do you think we should talk about improving this on Chat? (It seems like it will become extended discussion.)

@wizzwizz4 what about this room? http://chat.stackoverflow.com/rooms/100629/coded-conversations

@jcubic I mean creating a temporary room, which will be deleted after we've figured this out.

@wizzwizz4 you can create such room.

@jcubic I mean you must specify the rules.

@ChristianIrwan, jcubic http://chat.stackexchange.com/rooms/34428/discussion-about-display-2d-array-as-ascii-table

@ChristianIrwan the only rules are that the output need to look as in question, and first row may be a header.

@Adnan I've updated the question.

@jcubic I think you should add an input specification as well as [tag:code-golf]

I don't think it's a good idea to keep making little edits. After a certain number of edits, the question will automatically become Community Wiki.

@wizzwizz4 didn't know that.

@wizzwizz4 I don't think so

However, at least one cell in each row has only one space on its right.

If we want to take input as a single string instead of an array, does it have to be in the exact same format as the example inputs? If so, will there ever be any escaped characters (or will there ever be quotes in the input)? Can we also assume that there are no brackets or commas in the input other than the array delimiters? What about vertical bars? In general, what are the valid characters that can make up the strings in the table?

Both test cases being squares (6x6 and 3x3), they not really help spotting out dimension related errors.

CJam, 58 bytes
Anyone know trick of golfing in CJam?
q~z_{:,:e>)}%_{)'-*'++}%'+\+N+@@.{f{Se]"| "\+}}z'|N+f+1$f+

vim, 139 138 134
$x0xqq%ls<cr><esc>@qq@q:se nosol|%s/,/\t/g|%s/]/\t./|%!column -t -s'<C-v><Tab>'<cr>qwf";;h<C-v>GI|<esc>@wq@wll<C-v>Gls|<esc>0<C-v>Gs| <esc>:%s/"//g<cr>Yp:s/[^|]/-/g|s/|/+/g<cr>YggpkP

Accepts input in the form shown in the test cases. May or may not be valid, as this relies on the input string never containing any ", ,, ], or | characters.
If the input has to be able to contain ]s, then :%s/]/\t./<cr> can be replaced with qe$s<Tab>.<esc>j@eq@e for 2 extra chars. There is no easy way to allow ",| in the input.
Must be run in a Unix environment, as it relies on the column command line tool.
Slightly outdated explanation (by one revision, but that was just a bit of rearranging):
:se nosol<cr>    we need this later: G in visual block shouldn't go to BOL
$x0x             delete the surrounding pair of brackets
qq               record a macro
 %ls<cr><esc>    put each element of the big array on its own line
 @qq             recurse
@q               play back the macro until EOF
:%s/,/\t/g<cr>   replace all remaining commas with tabs
:%s/]/\t./<cr>   replace the ] at the end of lines with tabs and a dot
                 we need this for the line at the right edge of the table
:%!column -t     run the whole file through `column' on tabs
 -s'<C-v><Tab>
 '<cr>
qw               record another macro
 f";;            go forward 3 "s--that is, to the next "column"
 h               go back to the middle of the column
 <C-v>GI|<esc>   insert a line behind the cursor from top to bottom
 @wq             recurse
@w               play back until EOF
ll               move right before the line of dots we added earlier
<C-v>Gl          select the dots
s|<esc>          replace with a line (top to bottom)
0<C-v>G          select all the opening brackets
s| <esc>         again, (the leftmost) line
:%s/"//g<cr>     kill all the quotes around the data
Yp               duplicate bottom line
:s/[^|]/-/g<cr>  replace everything that's not a line with a dash
:s/|/+/g<cr>     now replace the lines with plus signs
YggpkP           put the separators before and after the first line

Thanks smpl for a byte!

You can save a byte by replacing :set with :se.

JavaScript (ES6), 210 212 219
Edit 2 bytes saved thx @Neil
a=>(J=(m,j)=>j+m.join(j)+j,a.map(r=>r.map((c,i)=>s[i]>(l=c.length)?0:s[i]=l),s=[]),t=J(s.map(n=>'-'.repeat(n+2)),'+'),z=a.map(r=>J(r.map((c,i)=>' '+c+' '.repeat(s[i]+1-c.length)),'|')),z[0]+=`
`+t,t+J(z,`
`)+t)

TEST

F=a=>(
  J=(m,j)=>j+m.join(j)+j,
  a.map(r=>r.map((c,i)=>s[i]>(l=c.length)?0:s[i]=l),s=[]),
  t=J(s.map(n=>'-'.repeat(n+2)),'+'),
  z=a.map(r=>J(r.map((c,i)=>' '+c+' '.repeat(s[i]+1-c.length)),'|')),
  z[0]+='\n'+t,
  t+J(z,'\n')+t
)

Z=[["License","2008-05-08","2009-03-11","2011-11-22","2013-08-12","2015-11-19"],["GPLv2","58.69%","52.2%","42.5%","33%","23%"],["GPLv3","1.64%","4.15%","6.5%","12%","9%"],["LGPL 2.1","11.39%","9.84%","?","6%","5%"],["LGPL 3.0","? (<0.64%)","0.37%","?","3%","2%"],["GPL family together","71.72% (+ <0.64%)","66.56%","?","54%","39%"]]

O.textContent=F(Z)

Did you mean a=>(?

(c,i)=>s[i]>(l=c.length)?0:s[i]=l saves you two bytes, I think.

@Neil 1. yes 2.thanks

@PhiNotPi agreed

Huh, why did that comment hit my inbox?

Python 2, 190
This solution makes use of list comprehensions and generator expressions. It accepts a list of lists, and returns a string in the required format.
def b(i):
 d=[max(map(len,c))for c in zip(*i)]
 a='+'+''.join('-'*h+'--+'for h in d)
 e=['|'+''.join(' '+f.ljust(h)+' |'for h,f in zip(d,j))for j in i]
 return'\n'.join([a,e[0],a]+e[1:]+[a])

The code before the minifier:
def mktable(data):
    sizes = [max(map(len, column)) for column in zip(*data)]
    divider = '+' + ''.join('-'*size+'--+' for size in sizes)
    lines = ['|' + ''.join(
                ' ' + value.ljust(size) + ' |' for size, value in zip(sizes, row)
                )
                for row in data]
    return '\n'.join([divider, lines[0], divider] + lines[1:] + [divider])

data = [
    ["License","2008-05-08","2009-03-11","2011-11-22","2013-08-12","2015-11-19"],
    ["GPLv2","58.69%","52.2%","42.5%","33%","23%"],
    ["GPLv3","1.64%","4.15%","6.5%","12%","9%"],
    ["LGPL 2.1","11.39%","9.84%","?","6%","5%"],
    ["LGPL 3.0","? (<0.64%)","0.37%","?","3%","2%"],
    ["GPL family together","71.72% (+ <0.64%)","66.56%","?","54%","39%"]
    ]

table = mktable(data)
print table

which outputs:
+---------------------+-------------------+------------+------------+------------+------------+
| License             | 2008-05-08        | 2009-03-11 | 2011-11-22 | 2013-08-12 | 2015-11-19 |
+---------------------+-------------------+------------+------------+------------+------------+
| GPLv2               | 58.69%            | 52.2%      | 42.5%      | 33%        | 23%        |
| GPLv3               | 1.64%             | 4.15%      | 6.5%       | 12%        | 9%         |
| LGPL 2.1            | 11.39%            | 9.84%      | ?          | 6%         | 5%         |
| LGPL 3.0            | ? (<0.64%)        | 0.37%      | ?          | 3%         | 2%         |
| GPL family together | 71.72% (+ <0.64%) | 66.56%     | ?          | 54%        | 39%        |
+---------------------+-------------------+------------+------------+------------+------------+

I was sad that this almost but did not quite work: from tabulate import*;a=input();print tabulate(a[1:],a[0],'psql',numalign='left')

185 bytes: Try it online!

MATLAB, 244 239 229 226
a=eval(regexprep(input(''),{'], *?[','[[',']]','"'},{';','{','}',''''}));s=size(a);c=repmat(' | ',s(1),1);b=c;for i=1:s(2)
x=char(a{:,i});b=[b x c];end
h=b(1,:);r=h*0+'-';r(h=='|')='+';b=[r;h;r;b(2:end,:);r];disp(b(:,2:end-1))

Explanation to follow.

Test case:
Input:
'[["License","2008-05-08","2009-03-11","2011-11-22","2013-08-12","2015-11-19"],["GPLv2","58.69%","52.2%","42.5%","33%","23%"],["GPLv3","1.64%","4.15%","6.5%","12%","9%"],["LGPL 2.1","11.39%","9.84%","?","6%","5%"],["LGPL 3.0","? (<0.64%)","0.37%","?","3%","2%"],["GPL family together","71.72% (+ <0.64%)","66.56%","?","54%","39%"]]'

Output:
+---------------------+-------------------+------------+------------+------------+------------+
| License             | 2008-05-08        | 2009-03-11 | 2011-11-22 | 2013-08-12 | 2015-11-19 |
+---------------------+-------------------+------------+------------+------------+------------+
| GPLv2               | 58.69%            | 52.2%      | 42.5%      | 33%        | 23%        |
| GPLv3               | 1.64%             | 4.15%      | 6.5%       | 12%        | 9%         |
| LGPL 2.1            | 11.39%            | 9.84%      | ?          | 6%         | 5%         |
| LGPL 3.0            | ? (<0.64%)        | 0.37%      | ?          | 3%         | 2%         |
| GPL family together | 71.72% (+ <0.64%) | 66.56%     | ?          | 54%        | 39%        |
+---------------------+-------------------+------------+------------+------------+------------+

Ruby, 129 126 127 126 characters
->a{t=?|
a.transpose.map{|c|t+=" %-#{c.map(&:size).max}s |"}
[d=(t%a[0].map{p}).tr('| ','+-'),a.map{|r|t%r}.insert(1,d),d]*$/}

Sample run:
2.1.5 :001 > puts ->a{t=?|;a.transpose.map{|c|t+=" %-#{c.map(&:size).max}s |"};[d=(t%a[0].map{p}).tr('| ','+-'),a.map{|r|t%r}.insert(1,d),d]*$/}[[["License","2008-05-08","2009-03-11","2011-11-22","2013-08-12","2015-11-19"],["GPLv2","58.69%","52.2%","42.5%","33%","23%"],["GPLv3","1.64%","4.15%","6.5%","12%","9%"],["LGPL 2.1","11.39%","9.84%","?","6%","5%"],["LGPL 3.0","? (<0.64%)","0.37%","?","3%","2%"],["GPL family together","71.72% (+ <0.64%)","66.56%","?","54%","39%"]]]
+---------------------+-------------------+------------+------------+------------+------------+
| License             | 2008-05-08        | 2009-03-11 | 2011-11-22 | 2013-08-12 | 2015-11-19 |
+---------------------+-------------------+------------+------------+------------+------------+
| GPLv2               | 58.69%            | 52.2%      | 42.5%      | 33%        | 23%        |
| GPLv3               | 1.64%             | 4.15%      | 6.5%       | 12%        | 9%         |
| LGPL 2.1            | 11.39%            | 9.84%      | ?          | 6%         | 5%         |
| LGPL 3.0            | ? (<0.64%)        | 0.37%      | ?          | 3%         | 2%         |
| GPL family together | 71.72% (+ <0.64%) | 66.56%     | ?          | 54%        | 39%        |
+---------------------+-------------------+------------+------------+------------+------------+


text:
Motion on a hexagonal grid
Given an input of a series of characters representing movements on a hexagonal
grid, output the final coordinates of the "pointer."
Our hexagons will be numbered like so (imagine a rectangular grid with every odd-numbered column shifted downwards slightly):
  _____         _____         _____         _____
 /     \       /     \       /     \       /     \
/ -3,-2 \_____/ -1,-2 \_____/  1,-2 \_____/  3,-2 \
\       /     \       /     \       /     \       /
 \_____/ -2,-1 \_____/  0,-1 \_____/  2,-1 \_____/
 /     \       /     \       /     \       /     \
/ -3,-1 \_____/ -1,-1 \_____/  1,-1 \_____/  3,-1 \
\       /     \       /     \       /     \       /
 \_____/ -2,0  \_____/  0,0  \_____/  2,0  \_____/
 /     \       /     \       /     \       /     \
/ -3,0  \_____/ -1,0  \_____/  1,0  \_____/  3,0  \
\       /     \       /     \       /     \       /
 \_____/ -2,1  \_____/  0,1  \_____/  2,1  \_____/
 /     \       /     \       /     \       /     \
/ -3,1  \_____/ -1,1  \_____/  1,1  \_____/  3,1  \
\       /     \       /     \       /     \       /
 \_____/       \_____/       \_____/       \_____/

The pointer starts at (0, 0).
The instructions you must support are as follows:

q: move up-left
w: move up
e: move up-right
a: move down-left
s: move down
d: move down-right
r: rotate grid clockwise
R: rotate grid counterclockwise

The rotation commands rotate the entire grid while keeping the pointer at the same coordinates. (Why qweasd? They match up with the directions nicely on a QWERTY keyboard.)
To help visualize this, here's what the movement commands would do, assuming
the pointer starts in the middle:
         _____
        /     \
  _____/   w   \_____
 /     \       /     \
/   q   \_____/   e   \
\       /     \       /
 \_____/       \_____/
 /     \       /     \
/   a   \_____/   d   \
\       /     \       /
 \_____/   s   \_____/
       \       /
        \_____/

After a clockwise rotation (r), the commands are remapped to (imagine it as
rotating the entire hex grid but still keeping "w" as up, etc., which is
equivalent to the following):
         _____
        /     \
  _____/   e   \_____
 /     \       /     \
/   w   \_____/   d   \
\       /     \       /
 \_____/       \_____/
 /     \       /     \
/   q   \_____/   s   \
\       /     \       /
 \_____/   a   \_____/
       \       /
        \_____/

Similarly, rotating counterclockwise (R) after that would return the grid to
normal, and rotating counterclockwise again would "remap" qwedsa to aqweds.
Input must be given as a single string, and output can be either a single
string joined by any non-numerical characters (ex. 1 2 or 3,4) or an array
of integers.
Since this is code-golf, the shortest code in bytes will win.
Test cases:
In                         Out
---------------------------------
edeqaaaswwdqqs             -2, 0
dddddddddd                 10, 5
wswseaeadqdq               0, 0
<empty string>             0, 0
esaaqrweesrqrq             -1, 0
wrwrwrwrw                  -1, 0
RRssrrrs                   -1, -1
aRRRRwddrqrrqqq            -1, -4
rrrrrrrrrrrrRRRRRRrrrrrrq  -1, -1
rrRrRrrRrrrrRRrRrRR        0, 0

Pyth, 81 bytes
J_K1=Y"qwedsa"A,ZZFNz=kxYN ?<kZ=Y?<x\rNZ.>Y1.<Y1A,+G@[JZ1KZJ)k+H@[J_2JK2K)k;,G/H2

Output is a list of integers representing the coordinates.
My solution is actually really boring; it just looks up the inputted character in an array (the qwedsa), and then accesses two arrays that represent the respective changes in the coordinates. For example, if the input is w, then we get 1 (as it is the second character in the array). Then we add A[1] to x (where A is the array for the changes in x in respect to the different inputs) and B[1] to y (where B is the changes for y). r and R are achieved by just rotating the qwedsa array.
I'm sure someone can do much better using Pyth. I'll continue to try to golf my answer though!
You can try it out here.

Retina, 353 339 178 175 150 130 129 117 bytes
R
5$*r
T`aq\we\ds`so`r.+
)`r(.*)
$1
^
:
a
sq
e
wd
+`(.+)q
w$1
+`(.+)d
s$1
+`sw

(.*)(\1w?):
$0$2
+`sw|ws

w+
-$0
\w
1

Output is in unary, separated by a colon. That means you won't really see zeroes in the output (although the presence of a colon will tell you which of the two coordinates is zero, if there is only one).
Try it online!
This was really fun and ended up being surprisingly short. :)
Explanation
Some background first. There are several coordinate systems to describe hexagonal grids. The one asked for uses offset coordinates. That's essentially like rectangular grid coordinates, except that one axis "wobbles" a bit. In particular, the question asks for the "odd-q" layout shown on the linked page. This coordinate system is a bit annoying to work with, because how the coordinates change during a move depends not only on the direction of the move but also on the current position.
Another coordinate system uses axial coordinates. That's essentially imagining the hexgrid as a diagonal slice through a volume of cubes, and using two of the axes (e.g. x and z) to find a position on the 2D plane. On the hex grid, that means that the two axes form an angle of 60 (or 120) degrees. This system is a bit less intuitive but much easier to work with, since every direction corresponds to a fixed "delta" vector. (For a better explanation of how to arrive at this coordinate system, check out the link and the lovely diagrams and animations there.)
So here's what we'll do: we compute the movement in axial coordinates (taking care of rotation as suggested in the challenge, by remapping the meaning of the commands), and when we're done we convert axial to to odd-q offset coordinates.
The six moves map to the following delta vectors in (x-z) axial coordinates:
q => (-1,  0)
w => ( 0, -1)
e => ( 1, -1)
d => ( 1,  0)
s => ( 0,  1)
a => (-1,  1)

Wait, this is Retina, we'll have to work with unary numbers. How do we work with negative unary numbers? The idea is to use two different digits. One represents +1 and the other represents -1. That means regardless of whether we want add or subtract 1 from the current position, we can always do so by adding a digit. When we're done we collapse the result into its magnitude (of the corresponding digit) by cancelling balanced digits. Then we figure out the sign based on the remaining digit, and replace all digits with 1.
The plan is to build up the axial x and z components to the left and right of a : (as a separator), in front of the input. w and s will add to the right-hand side. q and d will add to the left-hand side, and e and a will add to both sides. Since w and s are already on the correct side of the : (which will go in front), we will use those as the -1 and +1 digits, respectively.
Let's go through the code.
R
5$*r

We start by turning each R into five rs. Of course, one left turn is the same as five right turns on a hex grid, and by doing so we can a lot of duplication on the remapping step.
T`aq\we\ds`so`r.+

This is a transliteration stage which rotates the six commands, if they are found after the first r (thereby processing the first r). w and d need to be escaped to prevent them from expanding into character classes. The o inserts the source set into the target set which saves a bunch of bytes for these rotation tasks. The character mapping is therefore:
aqweds
saqweds

where the last s in the second row can simply be ignored.
)`r(.*)
$1

This removes the first r from the string, because it's been processed (I wish I had already implemented substitution limits...). The ) also tells Retina to run all stages up to this one in a loop until the string stops changing. On subsequent iterations, the first stage is a no-op because there are no more Rs and the second stage will apply another rotation as long as there are rs left in the string.
When we're done, we've mapped all commands to the direction they correspond to on the unrotated grid and can start processing those. Of course this movement is just a sum of those delta vectors, and sums are commutative, so it doesn't really matter in which order we process them now that rotations have been eliminated.
^
:

Insert the coordinate delimiter at the front.
Now we don't really need to process s and w. They are our +1 and -1 digits and they're already on the correct side of the : so they'll just drop out as required in the end. We can make another simplification: a is simply s + q and e is w + d. Let's do that:
a
sq
e
wd

Again, those s and w will just drop out. All we need to do is move those qs and ds to the front and turn them into ws and ss themselves. We do that with two separate loops:
+`(.+)q
w$1
+`(.+)d
s$1

So that's done. Time for the conversion from axial to offset coordinates. For that we need to collapse the digits. However, for now we only care about the left-hand side. Due to the way we've processed the qs and ds, we know that all the ss in the left-hand side will appear in front of any ws, so we only need to check one pair for collapsing the them:
+`sw

Now the actual conversion. Here is the pseudocode, taken from link above:
# convert cube to odd-q offset
col = x
row = z + (x - (x&1)) / 2

Right, so the left-hand side is already correct. The right-hand side needs the correction term (x - (x&1)) / 2 though. Taking &1 is the same as modulo 2. This basically parses as x/2, integer division, rounded towards minus infinity. So for positive x, we add half the number of digits (rounded down), and for negative x, we subtract half the number of digits (rounded up). This can be expressed surprisingly concisely in regex:
(.*)(\1w?):
$0$2

Due to the greediness, for even x, group 1 will match exactly half the digits, \1 the other half and we can ignore the w?. We insert that half after the : (which is x/2). If x is even, then we need to distinguish positive and negative. If x is positive, then w? will never match, so the two groups will still have to match the same number of digits. That's no problem if the first s is simply skipped, so we round down. If x is negative and odd, then the possible match is with \1 (half of x rounded down) and that optional w. Since both of those go into group 2, we will write x/2 with the magnitude rounded up (as required).
+`sw|ws

Now we collapse the digits on the right-hand side. This time, we don't know the order of the s and w, so we need to account for both pairs.
w+
-$0

Both parts are now reduced to a single repeated digit (or nothing). If that digit is w, we insert a minus sign in front.
\w
1

And finally we turn both into w and s into a single reasonable unary digit. (I suppose I could save a byte by using w or s as the unary digit, but that seems like a bit of a stretch.)

(Am I the only one who saw this answer come up on the main site page and dearly hoped it was written in hexagony?)

@FlagAsSpam The demands of this community are seriously increasing when it's possible to disappoint 8 people (and counting) by solving a challenge involving signed integers and hexagonal grids with a language that can only process its input via regexes. ;)

Python (3.5) 193 185 182 bytes
I also calcul in axial coordinates and convert at the end.
I add some optimisation according to @Martin Büttner solution :
I replace R by r*5, it doesn't change the bytes count. But with this change we can replace the second test elif j=='r' by just else
The solution assume we can't have invalid characters in the input.
def f(i):
 x=y=0;u=-1,0,-1,1,0,1,1,0,1,-1,0,-1;v='dewqas'
 for j in i.replace('R','r'*5):
  w=v.find(j)*2
  if-1<w:x+=u[w];y+=u[w+1]
  else:u=u[2:]+u[:2]
 print(-x,-x-y+(x-(x%2))/2)

Ungolfed
def f(i):
  x=y=0
  u=-1,0,-1,1,0,1,1,0,1,-1,0,-1    # operations list xd,yd,xe,ye...
  v='dewqas'                       # letters list in clockwise order
  i.replace('R','r'*5)             # replace 'R' by 5*'r'
  for j in i:
    w=v.find(j)*2                  # extract letter index
    if-1<w:
      x+=u[w]                      # apply operations
      y+=u[w+1]
    else:
      u=u[2:]+u[:2]                # rotate clockwise the operation string
  print(-x,-x-y+(x-(x%2))/2)       # convert coordinates axial to "odd-q"

Usage
>>> f('wrwrwrwrw')
-1 0.0
>>> f('dddddddddd')
10 5.0
>>> f('edeqaaaswwdqqs')
-2 0.0

Batch, 708 636 586 569 bytes
I used doubled y-coordinates because it made the maths simpler. I'm not sure I took the rotation into account in the most ideal way, but it beats counting the number of rs.
Edit: Saved 72 bytes by improving on the handling of Rs. Saved 60 bytes by optimising my set/a statements. Saved 17 bytes with some minor optimisations.
@echo off
set m=%1
set/ay=x=0
set r=r
set g=goto l
:l
set/a"z=y>>1
if "%m%"=="" echo %x% %z%&exit/b
set c=%m:~0,1%
set m=%m:~1%
goto %r:rrrrrr=%%c%
:a
:rq
:rrw
:rrre
:rrrrd
:rrrrrs
set/ax-=2
:w
:re
:rrd
:rrrs
:rrrra
:rrrrrq
set/ax+=1,y-=1
%g%
:q
:rw
:rre
:rrrd
:rrrrs
:rrrrra
set/ay-=2
%g%
:s
:ra
:rrq
:rrrw
:rrrre
:rrrrrd
set/ax-=2
:e
:rd
:rrs
:rrra
:rrrrq
:rrrrrw
set/ax+=+1,y+=1
%g%
:d
:rs
:rra
:rrrq
:rrrrw
:rrrrre
set/ay+=2
%g%
:r
:rr
:rrr
:rrrr
:rrrrr
:rrrrrr
if %c%==R set c=rrrrr
set r=%c%%r%
%g%

05AB1E, 60 bytes
.•F?äM•U2Å0IvXy'rQiÀUëy'RQiÁUëykÐ5α‚ßsD3%_s3›·+‚<+]Ć`DÉ-2÷+‚

Try it online or verify all test cases.
Explanation:
General explanation:
We start with a string "qwedsa" and a coordinate [0,0], and loop over the characters of the input.
If it's an "r" or "R" we rotate this string towards the left or right respectively.
If not, we get the 0-based index in this string, and map it as follows:
q → 0 → [-1,  0]
w → 1 → [ 0, -1]
e → 2 → [ 1, -1]
d → 3 → [ 1,  0]
s → 4 → [ 0,  1]
a → 5 → [-1,  1]

We'll need to convert the index-digits to the following \$x\$ and \$y\$ coordinates:
 x   indices     y   indices
-1 ← 0;5        -1 ← 1;2
 0 ← 1;4         0 ← 0;3
 1 ← 2;3         1 ← 4;5

We do this, by converting the index \$k\$ as follows:
\$x = min(k, abs(k-5))-1\$
\$y = (0\equiv k\pmod3) + 2(k\gt3) - 1\$
And after the entire loop, we have to fix the off-set of the \$y\$-coordinate based on the \$x\$-coordinate, which we do like this (\$x\$ remains the same):
\$y=y+\lfloor\frac{x-x\pmod2}{2}\rfloor\$
Code explanation:
.•F?äM•         # Push compressed string "qwedsa"
       U        # Pop and store it in variable `X`
2Å0             # Push list [0,0]
                # (many 3-byte alternatives for this: `00S`; `т¦S`; `0D‚`; `1¾‰`; etc.)
   Iv           # Loop over each character `y` of the input:
     X          #  Push string `X`
      y'rQi    '#  If `y` equals "r":
           À    #   Rotate string `X` once towards the left
            U   #   And pop and store it as new value for `X`
      ëy'RQi   '#  Else-if `y` equals "R":
            ÁU  #   Do the same, but rotate right instead
      ë         #  Else:
       yk       #   Get the 0-based index of `y` in the string `X`
         Ð      #   Triplicate this index
          5α    #   Take the absolute difference with 5
            ‚ß  #   Pair it with the original index, and pop and push the minimum
                #   (maps 0→[0,5]→0; 1→[1,4]→1; 2→[2,3]→2;
                #         3→[3,2]→2; 4→[4,1]→1; 5→[5,0]→0)
         sD     #   Swap to get the original index again, and duplicate it
           3%   #   Take modulo 3
             _  #   And check if it's equals to 0 (1 if truthy; 0 if falsey)
          s3›   #   Swap to take the index again, and check if it's larger than
                #   (again, 1 if truthy; 0 if falsey)
             ·  #   Double this
          +     #   And add both checks together
                #   (maps 0→1+0→1; 1→0+0→0; 2→0+0→0;
                #         3→1+0→1; 4→0+2→2; 5→0+2→2)
         ‚      #   Pair both mapped values together
          <     #   Decrease both by 1, so it becomes: 0→-1; 1→0; 2→1
           +    #   And add it to the current coordinates
    ]           # After the loop with inner if-else statements:
     Ć          # Enclose the coordinate, appending its own head: [x,y] becomes [x,y,x]
      `         # Push all three values separated to the stack
       D        # Duplicate this x
        É       # Check if its odd (1 if truthy; 0 if falsey)
         -      # Subtract it from the duplicated x
          2÷    # Integer-divide it by 2
            +   # Add it to y
             ‚  # And pair it with the original x again
                # (after which the result is output implicitly)

See this 05AB1E tip of mine (section How to compress strings not part of the dictionary?) to understand why .•F?äM• is "qwedsa".

Python 3, 227 bytes
def G(s):
 q='qwedsa'
 d=[-1,0,1,1,0,-1,-1,-2,-1,1,2,1]
 X=Y=0
 for c in s:
  if c in q:
   n = q.find(c)
   X += d[n]
   Y += d[n+6]
  if c == 'r':
   q = q[1:]+q[0]
  if c == 'R':
   q = q[5]+q[0:5]
 print(X, int((Y-X%2)/2))

I'm using Python 3.5.0b3 on MacOS, and while I did get an error in 5 and 6, due to rounding, the rest were correct. (Since fixed via Edit). What version of Python are you using?

@AustinHastings I'm on Python 3 on Debian unstable.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
HelloWorld error
Introduction
Everyone's first program outputs Hello World!. This program should be very simple, that's all you have to do.
Challenge
Output the string Hello World! to the STDERR.
Rules

If your language doesn't support STDERR or STDERR doesn't exist for it, you can output it to it's corresponding error system.
You can't output anything else to STDERR except for Hello World!.
You can't output anything to STDOUT or take any input from STDIN
You can't read any content from files.

This is code-golf, so the shortest answer in bytes wins.

PHP has stderr.

@Mego I personally don't think it's a duplicate. Seeing as how the output method is required to be different, programs cannot just be stolen from that challenge.

@ETHproductions IMO the different output method (STDERR vs STDOUT) isn't sufficiently different enough to make it not a dupe. Most of the answers could be trivially transformed by writing to STDERR or file stream 1 instead of STDOUT.

I'd tend to agree with @Mego. The distinction of writing to STDERR versus STDOUT is pretty trivial in the majority of languages.

I agree with @Mego and therefore closed this as duplicate, not unclear (despite what the banner says). The question is not unclear by any stretch of the imagination.

four reopen votes!?

@cat 5, actually. :P

Note: The comma in Hello, World! is not necessary. Please do yourself a favor and save a byte.

Relevant RosettaCode.

@Mego This question's point is about outputting to STDERR.  I've seen that Hello World question, and this isn't a copy.

@ElliotA. Just outputting something to STDERR is too trivial. Outputting Hello, World! (or any simple variant thereof) is a dupe. Combining those two pieces doesn't make for a good challenge.

Japt, 17 bytes
Currently winning! Let's hope Jelly doesn't pop in with an 11-byte answer...
Ox`È*w'HÁM W?ld!'

The ? should be the literal byte 8E. Test it online!
(STDERR is found below the "Upload a file" line in red text.)
How it works
  `È*w'HÁM W?ld!'  // Decompress this string. Returns "throw'Hello World!'"
Ox                 // Evaluate as JavaScript code. Throws the error.
                   // Implicit: Error is caught by interpreter and sent to STDERR.

Alternate version:
$throw$`HÁM W?ld!

Ham World? :P

@Doᴡɴɢᴏᴀᴛ ew ham world. Or should I say "È*w"?

zsh, 21 20 19 bytes
<<<Hello\ World!>&2

This is a zsh-specific feature; won't work in bash.
Thanks to @FlagAsSpam and @Dennis for a byte each!

JavaScript, 30 bytes
console.error("Hello, World!")

An alternative JavaScript answer, using console.error.

Java 8, 75 37 bytes
Thanks to @GamrCorps for slicing the code size almost exactly in half and showing me how to use lambda!
()->System.err.print("Hello World!");
Using interface because it makes the main declaration shorter. c:

darn it, you beat me to it!

@GamrCorps Booyah.

Hint: Java 8 and use a lambda

This isn't a full program.

@feersum I think we by default allow functions unless the question says "full program".

@ThomasKwa It says "everybody's first program..." Should I make it a program, or no?

@FlagAsSpam It's not "full program", so no.

@GamrCorps What's the lambda syntax, again?

@FlagAsSpam ()->System.err.print("Hello, World!"); should work

Why the down vote?

JavaScript, 19 bytes
throw"Hello World!"

Yes. It's that simple. Try it in the browser console on any page.

Would using bota be shorter (ie throw bota\Base64 String Here``)? idk, i haven't tried it.

@SpeedyNinja No, the ! and space will each cause an error if you try to compress it. It wouldn't be worth it anyway.

Oh ASCII, you're so helpless, ;)

whyyy doncha adda stack snippet!? :P

@cat It doesn't really work with a stack snippet, outputting instead uncaught exception: Hello World! to an error in the console.

C, 35 bytes
main(){write(2,"Hello World!",12);}

write writes to a file descriptor. STDERR is file descriptor 2, and 12 is the length of the string "Hello World!".

AutoIt, 33 bytes
ConsoleWriteError("Hello World!")

Bash, 24 21 20 bytes
Saved 3 bytes thanks to @Neil, then another from @Dennis!
echo Hello World!>&2
>&2 pushes the output to STDERR.

Drop the comma, use backslash to quote the !, and move the >&2 to the end without the space, to save 3 bytes.

Escaping the exclamation point is not required inside a script.

Python 2, 36 bytes
import os
os.write(2,'Hello World!')

Despite being based on a Unix syscall, this works as well on Windows.

Matlab, 21 bytes
error('Hello World!')

R, 23 bytes
message("Hello World!")

The message function writes to STDERR.

Ruby, 18 bytes
warn"Hello World!"

This only works if warnings are on (which is the default).

Works for me with irb.

C++, 53 bytes
#include<iostream>
main(){std::cerr<<"Hello World!";}

You can try it online if you feel so inclined.

Rust, 73 72 bytes
use std::io::Write;fn main(){std::io::stderr().write(b"Hello, World!");}

Rust is as long as ever...
Thanks to @ICanHazHats for saving a byte!

use std::io::Write;fn main(){std::io::stderr().write(b"Hello, World!");} is 72 bytes and is working with Rust 1.3 (I don't know how outdated that is)

@ICanHazHats That does work on the nightly. Thanks!

Don't thank me, I yanked it straight from stackoverflow http://stackoverflow.com/questions/27588416/how-to-send-output-to-stderr

These days you can write fn main(){eprint!("Hello, World!")}, but not that it matters as this challenge is closed.

Julia, 28 bytes
print(STDERR,"Hello World!")

Does what it looks like it does. STDERR is a built-in constant that refers to the standard error stream and print takes an optional argument specifying the stream.
Note that using error() prints out a bunch of extra garbage.

AppleScript, 19 bytes
error"Hello World!"
...pretty self-explanatory.

Like AppleScript always is.

@ElliotA. Amen.

PHP, 36 bytes
I don't know much PHP, but here goes...
<?php fwrite(STDERR,"Hello World!");

Tested on ideone.com.

Chapel, 29 bytes
stderr.write("Hello World!");

This language is probably overkill.

This language is overkill, unless you have a SuperComputer. Do you have a supercomputer, Phi?

@cat "The only supercomputer I have is my mind."  (As a serious answer, no, I just put Chapel on my laptop.)

You shoulda used multithreading for this answer. One thread per character of output, because why not!?

Python 3, 33 bytes
open(2,'w').write('Hello World!')

which py3 version are you running this on? When I try this I get an invalid handle error. (on second thoughts, it's more likely an OS problem)

@Flp.Tkc It works on both Linux and Windows for me. The stderr = 2 is a feature from Unix, but Python developers ported this special case to Windows.

C#, 95 bytes
using System;class M{public static void Main(string[]a){Console.Error.Write("Hello World!");}}

I'm trying to learn this langauge but god, it's verbose.
Ungolfed:
using System;

class MainClass {
    public static void Main (string[] args) {
        Console.Error.Write ("Hello World!");
    }
}

Congrats on exactly 1k rep!

@ETHproductions thanks! I previously had 1.2k but then I gave a bounty for an answer in SPL :P

Pike, 35 bytes
int main(){werror("Hello World!");}

Looks like C, isn't C. Is interpreted.

We can make this compile as ANSI C like this:
#include <stdio.h>
# ifndef __PIKE__
#   define werror(x) fputs(x, stderr)
# endif

int main() {
  werror("Hello World!");
}

I count 35 bytes...

@FlagAsSpam I can count today!!

Pascal (FP/GP), 51 bytes
program h;begin writeln(StdErr,'Hello World!');end.

Perl, 25 24 bytes
say stderr"Hello World!"

Requires version 5.10 or later.
Thanks to @FlagAsSpam for a byte!

Can you remove the space in stderr "Hello World!" (drop the comma).

Well, I got ninja'd!

@FlagAsSpam Nope. (This time for real.)

Hmm. It's really weird - some languages parse " as a parenthetical as well, allowing for some interesting stuff (notably in return""). I just generally put that down, now, because it's a lot of langs that have that.

Actually, you can remove the space (tested on perl 5.18.2).

@FlagAsSpam ...huh. Apparently it didn't work in the debugger for some reason. Thanks!

This is valid in 5.20.2, too.

Why not just die "Hello World!\n"? Try it online!

Forth, 65 bytes
Shorter than factor!
outfile-id stderr to outfile-id ." Hello World!" cr to outfile-id

Moonscript, 40 bytes
io.stderr.write io.stderr,"Hello World!"

CoffeeScript for Lua... because Lua is ugly as hell!

Lua5.2, 41 bytes
io.stderr.write(io.stderr,"Hello World!")

Cheeky golfed version of the  transpilation of my Moonscript answer.

Go, 39 38 37 70 69 bytes
package m;import."os";func main(){Stderr.WriteString("Hello World!")}

This is 37 bytes.

@FlagAsSpam I forgot there was a trailing space, oops! The spec really isn't clear on whether I can give a snippet (this) or a full program -- the C++ one is a full program, this isn't, but it's not said.

Snippets are never a valid form of answer. Usually programs or functions are, but the question asks for a program.

@feersum you're right, but it's only mentioned offhandedly, not in the actual spec list.

Drop the comma.

@FlagAsSpam thanks for that, I only changed that in the original post and not in the file I copied from :)

Mathematica, 35 bytes
"stderr"~WriteString~"Hello World!"

Quite simple.

This doesn't output an error message.  I think you need to use Message.  Anyway, messages appear in red font so as to be easily distinguished from output.

@DavidC Run this as a script.

I do not know what a script is.

@DavidC Just put the code in a file, and run MathematicaScript -script <file>.

Microsoft Windows Batch (also works in Wine), 22 bytes
echo Hello World! 1>&2

Perl 6, 19 21 bytes
note("Hello World!");

Factor, 67 bytes
"Let's use a modernisation of Forth", I said. "It will be fun!" I said.
Yea, the whitespace is needed.
error-stream get [ "Hello World!" print flush ] with-output-stream*

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
How many votes does a state get?
Given a list of the populations of each state, output, from greatest to least, the number of votes that state gets in the electoral college.
Input: The first number represents the total number of votes to distribute; it is followed by a list of and populations. In this example, abbreviations for states are used, but any name containing uppercase and lowercase letters could be used. You can take this in any format you like, as long as the only information contained is the state's abbreviation and its population.
Input may be taken as arguments to a function, or any way you want.
Example (possible) input: 538 [[CA 38000000], [NH 1300000] etc.]
Output: Output, in some format, the number of votes each state gets. Order the states from greatest to least. If two states have the same number of votes, order by whichever name would come first in a dictionary (which comes first alphabetically).
Before finding the number of votes, first check if there is a state named DC in the list of inputs, and if there is, give the state 3 votes, regardless of its population. Then, remove it from the list and assign the rest of the votes as though DC didn't exist.
The number of votes in the electoral college is defined to be the sum of the number of senators and representatives. Every state gets two senators, so subtract twice the number of states from the total (538, in the example input) to get the number of representatives. Assign every state one representative to start. Then, perform the following process:

Assign each state a number, A, defined to be P/sqrt(2) where P is the population.
Sort the states according to their values of A.
Assign the first state (the one with the largest A) one more representative.
Reassign values of A, as A = P/(sqrt(n)*sqrt(n + 1)), where n is the current number of representatives assigned to the state.
Go back to step 2. Repeat until all representatives have run out.

Example (possible) output: {CA: 518, NH: 20}. The output doesn't have to be in this format, but must contain the same information.
Note that if it is not possible to assign votes legally because there are less than 3*(# of states) votes, print whatever you want. You can crash, throw an error, etc.
Test cases:
538 [['CA' 38000000], ['NH' 1300000]] --> CA: 518, NH: 20
538 [['NH' 1300000], ['CA' 38000000]] --> CA: 518, NH: 20 (must be in order from greatest to least!)
538 [['DC' 1000000], ['RH' 1]] --> RH: 535, DC: 3
100 [['A', 12], ['B', 8], ['C', 3]] --> A: 51, B: 35, C: 14
100 [['A', 12], ['B', 8], ['C', 3], ['D', 0]]: --> [49, 34, 14, 3] (yes, even states with no population get votes)
2 [['A', 1]] --> aasdfksjd;gjhkasldfj2fkdhgas (possible output)
12 [['A', 1], ['B', 2], ['C', 3], ['D', 4]] --> A: 3, B: 3, C: 3, D: 3
42 [['K', 123], ['L', 456], ['M', 789]] --> M: 23, L: 14, K: 5
420 [['K', 123], ['L', 456], ['M', 789]] --> M: 241, L: 140, K: 39
135 [['C', 236841], ['D', 55540], ['G', 70835], ['K', 68705], ['M', 278514], ['Ms', 475327], ['Nh', 141822], ['Nj', 179570], ['Ny', 331589], ['Nc', 353523], ['P', 432879], ['R', 68446], ['Sc', 206236], ['Ve', 85533], ['Vi', 630560]] --> Vi: 20, Ms: 16, P: 14, Nc: 12, Ny: 12, M: 10, C: 9, Sc: 8, Nj: 7, Nh: 6, Ve: 5, D: 4, G: 4, K: 4, R: 4

After checking the expected output and comparing my code with it, the step that says "Reassign values of A, as A = P/(sqrt(n)*sqrt(n + 1)), where n is the current number of members assigned to the state." should be changed to "Reassign values of A, as A = P/(sqrt(n)*sqrt(n + 1)), where n is the current number of representatives assigned to the state.". That threw me off.

What should happen if the number of states is more than half the number of votes?

Clean, 263 244 222 bytes
v n s=sortBy(\(a,b)(c,d).b>d)([(t,3.0)\\t<-s|fst t=="DC"]++w(n-3*(length s))[(t,1.0)\\t<-s|fst t<>"DC"])
w 0s=w 0 s=[(p,r+2.0)\\(p,r)<-s]
w n s#s=sortBy(\a b.A a>A b)s
#(p,r)=hd s
=w(n-1)[(p,r+1.0):tl s]
A((_,p),r)=p/sqrt(r*r+r)

Call like
Start = v 538 [("DC", 1000000.0), ("RH", 1.0)]

Ungolfed version, full program (census.icl):
module census

import StdEnv

Start = votes 538 [("DC", 1000000.0), ("RH", 1.0)]

votes n states
# dc = filter (((==)"DC")o fst) states
= sortBy (\(a,b)(c,d).b>d) ([(t,3.0) \\ t <- dc] ++ votes` (n-3*length states) [(t,1.0)\\t<-removeMembers states dc])
where
    votes` 0 states = map (\(p,r).(p,r+2.0)) states
    votes` n states
    # states = sortBy (\a b.A a > A b) states
    # (p,r) = hd states
    = votes` (n-1) [(p,r+1.0):tl states]

    A ((_,p),r) = p / sqrt(r*r+r)

JavaScript ES6, 249 bytes 244 bytes
(r,s)=>{r-=s.length*3;s=s.map(t=>({s:t[0],p:t[1],a:t[1]/(q=Math.sqrt)(2),r:1}));while(r--)(t=>t.a=t.p/q(++t.r)/q(t.r+1))(s.filter(t=>t.s!='DC').sort((a,b)=>b.a-a.a)[0]);return''+s.sort((a,b)=>(r=b.r-a.r)?r:a.s>b.s?1:-1).map(t=>t.s+':'+(t.r+2))}

Test cases

d = (r, s) => {
  r -= s.length * 3;
  s = s.map(t => ({
    s: t[0],
    p: t[1],
    a: t[1] / (q = Math.sqrt)(2),
    r: 1
  }));
  while (r--)(t => t.a = t.p / q(++t.r) / q(t.r + 1))(s.filter(t => t.s != 'DC').sort((a, b) => b.a - a.a)[0]);
  return '' + s.sort((a, b) => (r = b.r - a.r) ? r : a.s > b.s ? 1 : -1).map(t => t.s + ':' + (t.r + 2))
};

document.write(
  '<pre>' +
  d(135, [
    ['C', 236841],
    ['D', 55540],
    ['G', 70835],
    ['K', 68705],
    ['M', 278514],
    ['Ms', 475327],
    ['Nh', 141822],
    ['Nj', 179570],
    ['Ny', 331589],
    ['Nc', 353523],
    ['P', 432879],
    ['R', 68446],
    ['Sc', 206236],
    ['Ve', 85533],
    ['Vi', 630560]
  ]) +
  '</pre>'
);

Credit to @Neil for saving 5 bytes!

.some((t,i)=>t.a=t.p/q(++t.r)/q(t.r+1)) would save you a byte if it works.

@Neil That doesn't do the same thing. The point is, that the 0th index is the only one whose representative attribute r is incremented each time.

That's why I used .some and not .map.

Oh, yeah, 5 bytes, because you don't use i any more. Nice!

@Neil I just realized this wouldn't work for a scenario in which the state population is 0. Updating to alternate solution with equivalent bytes.

Nice! I originally looked at the possibility of [0] but I couldn't see that saving.

Python 2, 219 bytes
v,s=input()
n={k:1 for k in s}
v-=3*len(s)
l=lambda x:-x[1]
if'DC'in s:del s['DC']
while v:A,_=sorted([(a,s[a]/(n[a]**2+n[a])**.5)for a in s],key=l)[0];n[A]+=1;v-=1
for a in n:n[a]+=2
print sorted(list(n.items()),key=l)

Takes input as
420,{'K':123,'L':456,'M':789}

Prints:
[('M', 241), ('L', 140), ('K', 39)]

I always found it funny how writing a full program in Python is almost always less bytes than writing a function because of indentation being a mandatory part of the syntax.


text:
Remove every N-th N
The task
In this challenge, your input is a non-empty list of positive integers, given in the native format of your language.
Your output is that same list, in the same format, with some elements removed.
You shall remove every occurrence of 1, every second occurrence of 2, every third occurrence 3, and so on.
In general, for every positive integer N, you shall remove every Nth occurrence of N from the list, starting with the Nth occurrence.
Example
Consider the input list
[3,2,6,1,1,6,2,3,2,6,6,6,6,1,6,6,3,3,7,2]

First, we remove every occurrence of 1:
[3,2,6,    6,2,3,2,6,6,6,6,  6,6,3,3,7,2]

Then every second occurrence of 2:
[3,2,6,    6,  3,2,6,6,6,6,  6,6,3,3,7  ]

Then every third occurrence of 3:
[3,2,6,    6,  3,2,6,6,6,6,  6,6,  3,7  ]

The numbers 4 and 5 don't occur in the input, so they can be skipped.
Next, we remove every sixth occurrence of 6:
[3,2,6,    6,  3,2,6,6,6,    6,6,  3,7  ]

There's only one occurrence of 7, so that can be skipped as well.
Thus the correct output is
[3,2,6,6,3,2,6,6,6,6,6,3,7]

Rules and scoring
You can write either a full program or a function.
The lowest byte count wins, and standard loopholes are disallowed.
Test cases
[1] -> []
[2] -> [2]
[1,1,1] -> []
[2,2,2] -> [2,2]
[1,1,2,2,2,3,3,3,3] -> [2,2,3,3,3]
[1,2,3,1,2,3,1,2,3,1,2,3] -> [2,3,3,2,3]
[3,2,6,1,1,6,2,3,2,6,6,6,6,1,6,6,3,3,7,2] -> [3,2,6,6,3,2,6,6,6,6,6,3,7]
[5,4,5,4,3,5,4,5,4,5,4,3,5,4,5,3,3,3,4,5,4,5,4,5,4,3,3,3,5,4] -> [5,4,5,4,3,5,4,5,4,3,5,4,5,3,3,4,5,5,4,4,3,3,5,4]
[6,4,5,8,2,9,3,1,8,5,3,5,5,6,3,5,1,2,3,9,3,5,8,7,5,9,1,3,4,8,2,3,4,7,8,5,8,5,3,1] -> [6,4,5,8,2,9,3,8,5,3,5,5,6,3,9,3,5,8,7,5,9,4,8,2,3,4,7,8,5,8,5,3]
[4,4,9,12,9,4,4,4,12,9,12,9,12,4,12,4,4,9,4,9,12,4,12,4,4,12,4,4,9,12,9,12,9,4,9,12,4,9,12,9,12,9,4,9,12,12,4,4,12,4] -> [4,4,9,12,9,4,4,12,9,12,9,12,4,12,4,9,4,9,12,4,12,4,12,4,4,9,12,9,12,4,9,12,9,9,12,9,4,9,12,12,4,4,12]
[2,2,11,11,11,11,6,2,2,6,6,2,2,2,2,6,11,6,11,11,2,11,2,6,6,11,2,11,6,2,6,6,6,6,6,11,2,11,11,6,6,6,11,6,2,6,2,6,6,2,11,2,2,11,11,11,11,2,6,2] -> [2,11,11,11,11,6,2,6,6,2,2,6,11,6,11,11,2,11,6,11,2,11,6,6,6,6,6,2,11,11,6,6,6,11,6,2,6,6,11,2,11,11,11,11,2,6]
[20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102] -> [20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,21,22,100,101,102,20,22,100,101,102,20,21,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,21,22,100,101,102,20,21,22,100,101,102,20,22,100,101,102,20,21,22,100,101,102,20,21,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,21,22,101,102,20,21,22,100,102,20,21,22,100,101,20,21,22,100,101,102,20,21,22,100,101,102,20,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,22,100,101,102,20,21,100,101,102]

Leaderboard
Here is a Stack Snippet to generate both a regular leaderboard and an overview of winners by language.
To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:
## Language Name, N bytes

where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:
## Ruby, <s>104</s> <s>101</s> 96 bytes

If you want to include multiple numbers in your header, make sure that the actual score is the last number in the header:
## Perl, 43 + 2 (-p flag) = 45 bytes

You can also make the language name a link which will then show up in the leaderboard snippet:
## [><>](http://esolangs.org/wiki/Fish), 121 bytes

var QUESTION_ID=70091,OVERRIDE_USER=32014;function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"https://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="
"+e.body.replace(OVERRIDE_REG,"")+"
")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;
body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}
 <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}	Link

{{LANGUAGE}}	{{NAME}}	{{SIZE}}	Link

Jelly, 10 8 bytes
=;\S€%af

Thanks to @Sp3000 for golfing off 2 bytes!
Try it online!
How it works
=;\S€%af    Main link. Input: A (list)

 ;\         Compute the cumulative concatenations of the elements of A, i.e., the
            list of A's prefixes.
=           Compare the elements of the nth prefix with the nth element of A.
   S€       Compute the sum of the resulting arrays.
     %      Take the nth sum modulo the nth element of A.
      a     Logical AND; replace the nth remainder with the nth element of A
            if the remainder is non-zero.
        f   Filter; remove the zeroes (which do not occur in A) from the result.

how does that comparison step work? and are the prefixes of [5,4,3,2,1] [[5],[5,4],[5,4,3],[5,4,3,2],[5,4,3,2,1]] or [[1],[2,1],[3,2,1],[4,3,2,1],[5,4,3,2,1]]?

@quintopia Jelly is left-to-right, so it is the first. = compares integers. For example, [3,2,1]=;\ compares 3 with the element of [3], 2 with the ones of [3, 2] and 1 with those of [3, 2, 1], giving [1, [0, 1], [0, 0, 1]].

Ah I was missing that it was comparing a list to a list element-by-list.

awk, 10 bytes
Input is expected on STDIN, one number per line.
++a[$1]%$1

Explanation
Keeps a counter for each number in an associative array, prints only if the counter value modulo n is not zero. Printing is implicit. Long version:
++a[$1]%$1{print $0}

Pyth, 18 15 14 10 9 bytes
f%/aYTTTQ

I think this is the first code I've written that has five consecutive variable references in nine bytes.
I wish the array manipulation solution (u.DG%HgxHGH{QQ, 14 bytes) weren't so long.
f%/aYTTTQ       Implicit: Q=input
                 lambda T:
    Y              Variable: starts as empty list.
   a T             Append T to Y. Mutates Y.
  /   T           Number of elts of Y that equal T.
 %     T         Modulo by T
f       Q       Filter that lambda over Q.

Try it here.

Python, 57 bytes
lambda l:[n for i,n in enumerate(l)if l[:i+1].count(n)%n]

Perl 6, 28 bytes
{$_=$;grep {++.{$^n}%$n},@_}

Explanation
{
  $_=$;        # put $_ in a clean state
  grep {
    ++.{$^n}   # increment $_{ $n } and declare $n as an argument
    % $n       # check if the count is not divisible by $n
  }, @_        # the input
}

Usage:
# give it a lexical name for ease of use
my &code = {...}

sub check ( @a, @b ){
  say try { so all code(@a) »==« @b } // False
}

check [1], []; # True
check [2], [2]; # True
check [1,1,1], []; # True
check [2,2,2], [2,2]; # True
check [1,1,2,2,2,3,3,3,3], [2,2,3,3,3]; # True
check [1,2,3,1,2,3,1,2,3,1,2,3], [2,3,3,2,3]; # True
check [3,2,6,1,1,6,2,3,2,6,6,6,6,1,6,6,3,3,7,2], [3,2,6,6,3,2,6,6,6,6,6,3,7]; # True

Double check that the correct elements are being thrown out
# have to change it to a pure number
# when checking $_         V
my &code = {$_=$;grep {++.{+$^n}%$n},@_}
# only matters here because we are using
# a subclass of Int but want it to use
# the same key as a normal Int

sub F ( Int $v ) { IntStr.new: $v, "Fail($v)" }
# prove that it passes through unchanged
say [F(2)];
# (Fail(2))

say code [3,2,6,F(1),F(1),6,F(2),3,2,6,6,6,F(6),F(1),6,6,F(3),3,7,F(2)];
# (3 2 6 6 3 2 6 6 6 6 6 3 7)

Seriously, 22 17 bytes
k╗,;`;;╜o;╗c%`M@░

Hex Dump:
6bbb2c3b603b3bbd6f3bbb6325604d40b0

Try It Online
Explanation:
k╗                                Put empty list in reg0
  ,;                              Two copies of input
    `        `M                   Map over the list
     ;;                           Make 2 extra copies of n
       ╜o                         Load reg0 and push the n onto it
         ;╗                       Put a copy back in reg0
           c                      Count the number of copies of n in the list
            %                     Take the result modulo n
               @░                 Filter the original list with the resulting list

This language...

JavaScript ES6, 34 bytes
a=>a.filter(v=>f[v]=-~f[v]%v,f=[])

Turned out to be the same as Brad's Perl algorithm.
Edit: Saved 2 bytes thanks to @edc65.

Good! save 2 bytes removing the inner parentheses a=>a.filter(v=>f[v]=-~f[v]%v,f=[])

a=>a.filter(f=v=>f[v]=-~f[v]%v)

Mathematica, 40 38 36 bytes
Select[(f@#=#)&/@#,++f[#]~Mod~#>0&]&

This is an unnamed function taking and returning a List. It defines a named function f when executed (to keep track of the numbers), but takes care of resetting the relevant definitions of f beforehand.
Explanation
The way functions (or function definitions) work in Mathematica is really powerful. As in Haskell (for instance), functions cannot only be overloaded and defined for certain types, but also for individual values (or arbitrary patterns of arguments, actually). But it is even more powerful than Haskell in that a) these values can be defined as side effects during control flow and b) the values can also be redefined at any time. That means functions are actually pretty powerful lookup tables (that can optionally compute the looked-up value instead of just storing it).
If we remove the golfitude from the code it would look a bit like this:
g[list_] := (
  Map[
    (f[#] = #) &,
    list
  ];
  Select[
    list,
    Mod[++f[#], #] > 0 &
  ]
)

So first, we loop over the input and define f[x] = x, for all x in the list. f will ultimately be used to keep track of how often each number has already appeared in the list. Why do we not count from 0? The loop over the list is a Map. The expression f[x] = y returns y (in addition to storing the function definition). So by setting f[x] to x, the map will evaluate to the input list itself. That saves two bytes because then we don't need to provide list again explicitly to Select. Starting from x instead of 0 doesn't affect the computation at all since we're only ever interested in Mod[f[x], x].
(Normally we could simply use something like f[_] = 0 as a fallback definition to avoid the Map, but we don't know if our function has been used before, which would leave some previous values defined that would mess with our counting.)
Then Select filters the list by keeping only those elements where the unnamed function passed as the second argument yields True. That function first increments the value of f[x] (where x is the current list element), in order to count the occurrences, and then it takes the resulting count modulo x. We want to discard all elements where this yields 0.

CJam, 17 bytes
Lq~{:X+_Xe=X%},p;

Just beat... J? Not sure what my expectations are for this challenge, really. Note that "" is CJam's representation of an empty array.
Try it online | Test suite (the last case is too long for the permalink)
Explanation
L                     Push empty array (let's call it L)
 q~                   Push input and evaluate

   {         },       Filter the array elements by...
    :X                   Save number to variable X
      +                  Append to L

       _                 Duplicate
        Xe=              Count occurences of X
           X%            Take modulo X

                      The top element is popped to determine whether or not to keep that
                      element, with the updated L kept on the stack for the next iteration

               p      Print the resulting filtered array
                ;     Pop L, which is now equal to the input array

JavaScript ES6, 55 bytes
a=>a.filter((v,i)=>a.filter((w,j)=>j<=i&v==w).length%v)

Explanation
a=>                            //a -> input array
 a.filter(                     //filter array. only keep elements if inside function returns truthy
      (v,i)=>                  //inside function to decide whether to keep items. v -> item; i -> index
           a.filter((w,j)=>    //get all ocurrences of v that occur before index i
                j<=i&v==w      //(this is done by keeping all items w at index j, if j <= i and v == w
           ).length%v          //get length (count ocurrences), and mod v.
                               //this will only be falsy if the number of ocurrences of v up to this index is divisible by v. (0 -> falsy, positive -> truthy)
 )                             //so, we don't keep every second 2, every third 3, etc.

J, 18 bytes
#~((0<]|+/@:=){:)\

Usage:
   (#~((0<]|+/@:=){:)\) 1 2 3 1 2 3 1 2 3 1 2 3
2 3 3 2 3

Pretty straightforward method. We count the occurrences of a number up to it and select the number only if the number divides the count.
More explanation comes later.
Try it online here.

PowerShell, 56 bytes
param($a)$b=,0*($a|sort)[-1];$a|%{if(++$b[$_-1]%$_){$_}}

Uses a similar helper-array-trick as Rainer P's answer, which I developed independently but I apparently got FGITW'd.
Takes input as an array with param($a). We then create our helper array $b as a populated-with-zeros array by using the comma operator coupled with the overloaded multiplication operator. This creates $b to be equal to @(0,0,0...0) with $b.length equal to the maximal number in $a.
(Quick plug for my "Showcase your language" answer where I describe this in detail)
Next is our output. We loop over every element of our input array $a|%{...} and each loop check an if statement. The conditional pre-increments the value in our helper array that corresponds with the current element, then checks whether it's a multiple of the current element with the modulo operator. If it is a multiple, the % will equal 0 which is falsey, so the if doesn't execute. Otherwise, we output the current element.
Takes advantage of implicit typecasting to save on output formatting. If a function or program returns multiple elements, and you save the results to a variable, PowerShell will dynamically create that variable as an array. Example:
PS C:\Tools\Scripts\golfing> $testc = .\remove-every-nth-n.ps1 @(2,2,2)

PS C:\Tools\Scripts\golfing> $testc
2
2

PS C:\Tools\Scripts\golfing> $testc.GetType()

IsPublic IsSerial Name                                     BaseType
-------- -------- ----                                     --------
True     True     Object[]                                 System.Array

Haskell, 58 56 bytes
2 bytes saved by xnor
q w=[x|(n,x)<-zip[1..]w,0<mod(sum[1|u<-take n w,u==x])x]

Try it online!

IF you do zip[1..], you no longer have to add 1 to n: 56 bytes

Perl 5, 24 + 1 -p= 25 bytes
$\.=$_ if++$k{0|$_}%$_}{

Try it online!
Input has each entry on a separate line

Very nice approach! I was looking into @F and found nothing particularly short that way... You can shrink this down a bit more too using say and -nl: Try it online! you can probably do some similar changes if you'd rather not use say though (but you already have -M5.10.0 so.... :) )!

R, 110 98  99 92 Bytes
function(a){for(i in 1:max(a))for(j in seq_along(b<-which(a==i)))if(j%%i<1)a[b[j]]=0;a[a>0]}

Edit complete rewrite fixes bug with test case 2/3
Edit 2 Save 7 bytes thanks to @Alex-A

92 bytes: function(a){for(i in 1:max(a))for(j in seq_along(b<-which(a==i)))if(j%%i<1)a[b[j]]=0;a[a>0]}

MATL, 20 bytes
tu"t@=f@@h0h)0w(]tg)

This uses current release (10.2.1) of the language/compiler.
Try it online!
Explanation
tu        % implicitly input array. Duplicate and get unique elements
"         % for each unique element, say "i"
  t       % duplicate
  @=f     % indices of occurrences of i
  @@h0h   % build index representing i-th occurrences (Matlab's i:i:end)
  )       % keep only indices of i-th occurrences
  0w(     % set those entries to 0
]         % end for loop
tg)       % keep nonzeros only. Implicit display

R, 63 bytes
f=function(z){n=seq(z);for(i in n)z[which(z==i)[n*i]]=0;z[z>0]}

C#, 224 bytes
List<int>R(List<int>l,int n=1){l=l.Where(w=>w!=0&&w!=1).ToList();for(int i=0,t=0;i<l.Count;i++){if(l[i]==n&&++t==n){l[i]=0;t=0;}}return !l.Any()||n>l.Max()?l:R(l,++n);}

This code uses recursion. With using statements that's 224 bytes (160 for the method code itself).
Try it online.
List <int> R(List <int> l, int n = 1)
{
    l = l.Where(w => w > 1).ToList();
    for (int i = 0, t = 0; i < l.Count; i++)
    {
        if (l[i] == n && ++t == n)
        {
            l[i] = 0;
            t = 0;
        }
    }
    return !l.Any() || n > l.Max() ? l : R(l, ++n);
}

You should be able to save a few chars by removing the continue statement. Something like (untested) for(int i=0,t=0;i<l.Count;i++)if(l[i]==n&&++t==n)l[i]=t=0;

@peter-taylor, you're right, thanks. Also, had to add some code to fixed a bug.

If you've imported System.Linq then !l.Any() is shorter than l.Count<1, which is shorter than l.Count==0.

@peter-taylor thanks, I also replaced w != 0 && w !=1 with w > 1.

arrays should be good too and they would be a bit shorter int[] R(int[] l, int n = 1)

Haskell, 78 bytes
f l=[l!!n|n<-[0..length l-1],0/=mod(1+(length.filter(==l!!n)$take n l))(l!!n)]

Try it Online!

Factor, 61 bytes
[ H{ } clone '[ _ 2dup inc-at over of swap mod 0 > ] filter ]

Try it online!
The idea is to have a hash table that keeps a running count of each element. Then we reject each element from the input that is divisible by its current count.

TI-BASIC, 47 bytes
Input X
For(I,1,dim(∟X
∟X(I
If fPart(sum(∟X=Ans),1,I)/Ans
Ans→L₁(1+dim(L₁
End
L₁

This uses the fact that, on a fresh calculator, L₁ is initialized and cleared. Note that trying to display an empty list in TI-BASIC throws an error.

C# - 177 Bytes
void r(List<int> i){for(int c=1,k=1,m=i.Max();k<=m;k++){var n=new List<int>();foreach(var o in i)if(o==k&&c++==k)c = 1;else n.Add(o);i=n;}Console.WriteLine(string.Join(" ",i));}

Ungolfed
void r(List<int> i)
{
    for (int c = 1, k = 1, m = i.Max(); k <= m; k++)
    {
        var n = new List<int>();
        foreach (var o in i)
            if (o == k && c++ == k)
                c = 1;
            else
                n.Add(o);
        i = n;
    }
    Console.WriteLine(string.Join(" ", i));
}

I believe you would have to count the using statements, in which case this would be 241 bytes long.

Mathematica, 63 bytes
Fold[Delete[#,Position[#,#2][[#2;;;;#2]]~Check~{}]&,#,Union@#]&

Quite interesting to golf! Ignore the occasional message that pops up.

Ruby, 120 bytes
->a{1.upto(a.max).each{|i|k=0;a.length.times.each{|j|k+=1if a[j]==i;a[j]=''if k%i==0&&a[j]==i;a[j]}};a.select{|i|i!=''}}

APL, 16 chars
{⍵/⍨×⍵|+/¨⍵=,\⍵}

In English:

,\⍵: vector of the vector prefixes up to the nth-element of the argument
+/¨⍵=: per prefix vector, count how many are equal to the n-th element itself
×⍵|: signs of the mod's (that is: 0 if the remainder of the division is 0, 1 otherwise)
⍵/⍨: of the argument keep only the element where the mod is 0

Racket 179 bytes
(λ(l)(define m(apply max l))(let g((n 1)(c 0))(set! l(for/list((i l))(if(= i n)(begin
(set! c(+ 1 c))(if(= 0(modulo c n))0 i))i)))(if(< n m)(g(+ 1 n)0)(filter(λ(x)(> x 0))l))))

Ungolfed:
(define f
  (λ(l)
    (define m (apply max l))
    (let loop ((n 1) (c 0))
      (set! l (for/list ((i l))
                (if (= i n)
                    (begin
                      (set! c (+ 1 c))
                      (if (= 0 (modulo c n))
                          0 i ))                  ; replace by 0
                    i )))
      (if (< n m)
          (loop (+ 1 n) 0)
          (filter (λ(x)(> x 0)) l)                ; remove all 0s
          ))))

Testing:
(f '[1])
(f '[2])
(f '[1 1 1])
(f '[2 2 2])
(f '[1 1 2 2 2 3 3 3 3])
(f '[1 2 3 1 2 3 1 2 3 1 2 3])
(f '[3 2 6 1 1 6 2 3 2 6 6 6 6 1 6 6 3 3 7 2])

Output:
'()
'(2)
'()
'(2 2)
'(2 2 3 3 3)
'(2 3 3 2 3)
'(3 2 6 6 3 2 6 6 6 6 6 3 7)

05AB1E, 8 bytes
ʒˆ¯y¢yÖ_

Inspired by @RainerP.'s awk answer.
Try it online or verify all test cases.
Explanation:
ʒ         # Filter the (implicit) input-list by:
 ˆ        #  Pop and add the current integer to the global array
    ¢     #  Count how many times
   y      #  the current integer
  ¯       #  occurs in the global array
       ≠  #  Check that this count is NOT
      Ö   #  evenly divisible
     y    #  by the current integer
          # (after which the filtered list is output implicitly as result)

Haskell + hgl, 27 bytes
gj<<fn(by**(ce~<gj)$gj)<pxn

Attempt This Online!
Explanation
This code is a rats nest. That's in part because to do the glue for this program I tried structuring it a bunch of different ways, plugging things into the pointfree converted until I ran out of ideas and using the shortest one.
It's rather difficult to truly explain it, but the rough idea is as follows:
First we use pxn to get all the prefixes of the list. Then we perform a filter to filter out prefixes where their last element occurs in the prefix a number of times divisible by that last element.  Then we get the last element of each prefix.
The rats nest is in the part where we "filter out prefixes where their last element occurs in the prefix a number of times divisible by that last element". By the description it seems like that is a rather complex operation.
Reflection
There are a couple of things I think would have been really helpful.

It would be nice to have a combined zip and filter.  What I'd really like is something like
(Alternative f, Zip f) => (a -> b -> Bool) -> f a -> f b -> f a

But I'd happily settle for:
(Alternative f, Zip f) => f a -> f Bool -> f a

which seems like it would have more general use.
Speaking of odd filters. Why not have prefix/suffix filters? This solution is doing a filter on the prefix list, and I can imagine it happening again in the future. There are a couple of ways to do this. The best motivated types seem to be
(a -> List a -> Bool) -> List a -> List a

and
(List a -> Bool) -> List a -> List (List a)


text:
Matching Adjacent Words
In this challenge, you are passed two words: Your job is to determine if they are adjacent.
Two letters are adjacent if:

They are the same letter, or
They are lexicographically adjacent.

For example, J is adjacent to I,J, and K only.  Z is not adjacent to A
Two words are adjacent if:

They are the same length, and
Each letter is adjacent to a unique letter in the other word.

For example, CAT is adjacent to SAD, as C>D, A>A, T>S.
FREE is not adjacent to GRRD (each E needs a letter to pair with).
Input/Output
You are passed two strings, and you need to return a truthy value if they are adjacent, otherwise a falsy value.  You should return within a minute for all test cases below.
You can assume that the strings will only contain uppercase, alphabetic letters.
The two strings can be passed as a list, or concatenated, with or without quotes.
Test Cases
Truthy:
A A
A B
C B
DD CE
DE FC
ABCD BCDE
AACC DBBB
DJENSKE FDJCLMT
DEFGHIJKL HJLEHMCHE
IKLIJJLIJKKL LJLJLJLJLJHI
ACEGIKMOQSUWY BLNPRDFTVHXJZ
QQSQQRRQSTTUQQRRRS PQTTPPTTQTPQPPQRTP
ELKNSDUUUELSKJFESD DKJELKNSUELSDUFEUS

Falsy:
A C
A Z
B J
JK J
CC BA
CE D
DJENSKE GDJCLMT
DEFGHIJKL HJLHMCHE
IJKLIJKLKIJL LIJLLHJLJLLL
AWSUKMEGICOQY RSHXBLJLNQDFZ
QQSQQRRQSTTUQQQRRS PQTTPPTTQTPQPPQRTT
ELKNSDUVWELSKJFESD DKJELKNSUELSDUFEUS

This is code-golf, so the shortest valid answer wins!

Can the input have quotes around them, like "A A"?

Fixed test cases.  Quotes are fine.

Will the be input only be uppercase?

You can assume that, yes.

I think you should mention in the challenge text that you allow defining the input strings with quotes. Would a single array of the form {'string1' 'string2'} be acceptable as well?

CJam, 14 13 12 bytes
r$r$.-:)3,-!

Try it online! or verify all test cases at once.
Algorithm
Let s and t be two sorted words of the same length. For s and t to be lexicographically adjacent (LA), it is necessary and sufficient that all pairs of its corresponding characters are also LA.
The condition is clearly sufficient for all words, and necessary for words of length 1.
Now, assume s and t have length n > 1, and let a and b be the first characters, resp., of s and t.
Since s and t are LA, there is some bijective mapping φ between the characters of s and the characters of t such that x and φ(x) are LA for all x in s, meaning that |x - φ(x)| ≤ 1 for all x in s.
Let c = φ(a) and d = φ-1(b). Because of a's and b's minimality, a ≤ d (1) and b ≤ c (2).
Furthermore, since b and d, and a and c, and LA, d ≤ b + 1 (3) and c ≤ a + 1 (4).
By combining (1) and (3), and (2) and (4), we get that a ≤ d ≤ b + 1 and b ≤ c ≤ a + 1, from which we deduce that a - 1 ≤ b ≤ a + 1 and, therefore, that a and b are LA.
Now, by combining (1) and (4), and (2) and (3), we get that c - 1 ≤ a ≤ d and d - 1 ≤ b ≤ c, from which we deduce that c - 1 ≤ d ≤ c + 1 and, therefore that c and d are LA.
Thus, if we redefine φ by φ(a) = b and φ(d) = c, |x - φ(x)| ≤ 1 will still hold for all x in s and, in particular, for all x in s[1:].
This way, s[0] = a and t[0] = b, and s[1:] and t[1:], are LA.
Since s[1:] has length n - 1, this proves the necessity by induction.
Code
r               e# Read the first word from STDIN.
 $              e# Sort its characters.
  r             e# Read the second word from STDIN.
   $            e# Sort its characters.
    .-          e# Perform vectorized subtraction.
                e# This pushes either the difference of char codes of two
                e# corresponding characters or a character that has no does not
                e# correspond to a character in the other, shorter word.
      :)        e# Increment all results.
                e# In particular, this maps [-1 0 1] to [0 1 2].
        3,      e# Push the range [0 1 2].
          -     e# Perform set difference, i.e., remove all occurrences of 0, 1 and
                e# 2 from the array of incremented differences.
           !    e# Apply logical NOT. This gives 1 iff the array was empty iff
                e# all differences gave -1, 0 or 1.

I think there's a simpler argument -- the only places the matching can violate the sorted order is when two things cross like C->Y, D->X, and those can just be uncrossed.

@xnor That's basically what I wrote. Just with a lot more words. :P

MATL, 10 12 17 bytes
c!S!odXl2<

This uses Dennis' approach: sort first and compare characters in matching positions.
Input is an array of strings, with the format {'CAT 'SAD'}.
Output is an array of zeros and ones. A result is truthy iff it contains all ones (this is agreed to be truthy).
Uses current release (10.2.1), which is earlier than this
challenge.
EDIT: Function Xl has been renamed to | in newer versions of the language (and o is no longer necessary). The link below includes those modifications.
Try it online!
Explanation:
c         % implicitly cell array of strings and convert to 2D char array.
          % This pads with spaces if needed
!S!       % sort each row
o         % convert array from char to double
d         % difference between elements in the same column
Xl        % absolute value of each entry
2         % number literal
<         % each entry becomes 1 if smaller than 2 (adjacent letters), and 0 otherwise

Old approach, which accepts the strings as separate inputs: 12 bytes:
SiSXhcodXl2<

EDIT: the code in the link has been modified acording the changes in the language; see comment above.
Try it online!
Explanation:
S         % implicitly input first string and sort
iS        % input second string and sort
Xh        % build cell array with these two strings
c         % convert to 2D char array. This pads with spaces if needed
o         % convert array from char to double
d         % difference between elements in the same column
Xl        % absolute value of each entry
2         % number literal
<         % each entry becomes 1 if smaller than 2 (adjacent letters), and 0 otherwise

So the array [1 0 1] is falsy in MATL. That's useful.

@Dennis Isn't that falsey in other languages as well? In Matlab/Octave it works that way: all elements have to be nonzero

No. In fact, I don't know another language that behaves this way. In Python and CJam, e.g., arrays are truthy iff they're non-empty. In JavaScript and Ruby, e.g., all arrays are truthy.

@Dennis That's weird to my Matlab way of thinking. So in Python an array [0 0] is truthy?

Yes, because it has a positive length. That's usually annoying when golfing.

C, 233 bytes
#include <stdlib.h>
#include <string.h>
#define h char
#define r return
int c(void*a,void*b){r*(h*)a-*(h*)b;}int a(h*s,h*t){int l=strlen(s),m=strlen(t);if(l!=m)r 0;qsort(s,l,1,c);qsort(t,m,1,c);while(l--)if(abs(s[l]-t[l])>1)r 0;r 1;}

You can test it by saving that as adj.h and then using this adj.c file:
#include <stdio.h>
#include "adj.h"

int main() {
  char aa[] = "A", A[] = "A";
  char b[] = "A", B[] = "B";
  char cc[] = "C", C[] = "B";
  char d[] = "DD", D[] = "CE";
  char e[] = "DE", E[] = "FC";
  char f[] = "ABCD", F[] = "BCDE";
  char g[] = "AACC", G[] = "DBBB";
  char hh[] = "DJENSKE", H[] = "FDJCLMT";
  char i[] = "DEFGHIJKL", I[] = "HJLEHMCHE";
  char j[] = "IKLIJJLIJKKL", J[] = "LJLJLJLJLJHI";
  char k[] = "ACEGIKMOQSUWY", K[] = "BLNPRDFTVHXJZ";
  char l[] = "QQSQQRRQSTTUQQRRRS", L[] = "PQTTPPTTQTPQPPQRTP";
  char m[] = "ELKNSDUUUELSKJFESD", M[] = "DKJELKNSUELSDUFEUS";
  char n[] = "A", N[] = "C";
  char o[] = "A", O[] = "Z";
  char p[] = "B", P[] = "J";
  char q[] = "JK", Q[] = "J";
  char rr[] = "CC", R[] = "BA";
  char s[] = "CE", S[] = "D";
  char t[] = "DJENSKE", T[] = "GDJCLMT";
  char u[] = "DEFGHIJKL", U[] = "HJLHMCHE";
  char v[] = "IJKLIJKLKIJL", V[] = "LIJLLHJLJLLL";
  char w[] = "AWSUKMEGICOQY", W[] = "RSHXBLJLNQDFZ";
  char x[] = "QQSQQRRQSTTUQQQRRS", X[] = "PQTTPPTTQTPQPPQRTT";
  char y[] = "ELKNSDUVWELSKJFESD", Y[] = "DKJELKNSUELSDUFEUS";
  char *z[] = {aa,b,cc,d,e,f,g,hh,i,j,k,l,m,n,o,p,q,rr,s,t,u,v,w,x,y};
  char *Z[] = {A ,B,C ,D,E,F,G,H ,I,J,K,L,M,N,O,P,Q,R ,S,T,U,V,W,X,Y};

  for(int _=0;_<25;_++) {
    printf("%s %s: %s\r\n", z[_], Z[_], a(z[_], Z[_]) ? "true" : "false");
  }

  return 0;
}

Then compile using gcc adj.c -o adj. The output is:
A A: true
A B: true
C B: true
DD CE: true
DE CF: true
ABCD BCDE: true
AACC BBBD: true
DEEJKNS CDFJLMT: true
DEFGHIJKL CEEHHHJLM: true
IIIJJJKKKLLL HIJJJJJLLLLL: true
ACEGIKMOQSUWY BDFHJLNPRTVXZ: true
QQQQQQQRRRRRSSSTTU PPPPPPPQQQQRTTTTTT: true
DDEEEFJKKLLNSSSUUU DDEEEFJKKLLNSSSUUU: true
A C: false
A Z: false
B J: false
JK J: false
CC AB: false
CE D: false
DEEJKNS CDGJLMT: false
DEFGHIJKL HJLHMCHE: false
IIIJJJKKKLLL HIJJJLLLLLLL: false
ACEGIKMOQSUWY BDFHJLLNQRSXZ: false
QQQQQQQQRRRRSSSTTU PPPPPPQQQQRTTTTTTT: false
DDEEEFJKKLLNSSSUVW DDEEEFJKKLLNSSSUUU: false

157 bytes

JavaScript (ES6), 86 90 94
Edit 4 bytes saved thx @Neil
Edit 2 4 bytes save thx @Mwr247
(a,b)=>[...[...a].sort(),0].every((x,i)=>parseInt(x+([...b].sort()[i]||0),36)%37%36<2)

Note: adjacency check on a pair of letters. Take the pair as a base 36 number n, if the letters are equal, then n = a*36+a = a*37. If there is a difference of 1 then n = a*36+a+1 = a*37+1 or n = a*36+a-1 = a*37-1. So n % 37 must be 0, 1 or 36. And n%37%36 must be 0 or 1.
Note 2: the added '0' is used to ensure that a and b are the same length. It's shorter then a.length==b.length

F=(a,b)=>[...[...a].sort(),0].every((x,i)=>parseInt(x+([...b].sort()[i]||0),36)%37%36<2)

console.log=x=>O.textContent+=x+'\n';

testOK=[['A','A'],['A','B'],['C','B'],['DD','CE'],['DE','FC'],
['ABCD','BCDE'],['AACC','DBBB'],['DJENSKE','FDJCLMT'],
['DEFGHIJKL','HJLEHMCHE'],['IKLIJJLIJKKL','LJLJLJLJLJHI'],
['ACEGIKMOQSUWY','BLNPRDFTVHXJZ'],
['QQSQQRRQSTTUQQRRRS','PQTTPPTTQTPQPPQRTP'],
['ELKNSDUUUELSKJFESD','DKJELKNSUELSDUFEUS']];
testFail=[['A','C'],['A','Z'],['B','J'],['JK','J'],['CC','BA'],['CE','D'],
['DJENSKE','GDJCLMT'],['DEFGHIJKL','HJLHMCHE'],
['IJKLIJKLKIJL','LIJLLHJLJLLL',''],
['AWSUKMEGICOQY','RSHXBLJLNQDFZ'],
['QQSQQRRQSTTUQQQRRS','PQTTPPTTQTPQPPQRTT'],
['ELKNSDUVWELSKJFESD','DKJELKNSUELSDUFEUS']];

console.log('TRUE')
testOK.forEach(t=>{
  var a=t[0],b=t[1],r=F(a,b)
  console.log(r+' '+a+' '+b)
})
console.log('FALSE')
testFail.forEach(t=>{
  var a=t[0],b=t[1],r=F(a,b)
  console.log(r+' '+a+' '+b)
})

I think you can use '' in place of the first '0' since it doesn't change the value of the parse.

@Neil right, and thinking again it's even better. I can use numeric 0 and 0. When adding to a string it become a string anyway, and numeric 0+0 is still 0 mod whatever

I believe you can collapse your b sort with the character reference: (a,b)=>[...[...a].sort(),0].every((x,i)=>parseInt(x+([...b].sort()[i]||0),36)%37%36<2) = 86 bytes

@Mwr247 clever. Thanks

Python 2, 90 bytes
lambda A,B:all(ord(b)-2<ord(a)<ord(b)+2for a,b in zip(sorted(A),sorted(B)))*len(A)==len(B)

Simple anonymous function, I have to have a separate check for length because zip will just contatenate.  Theres a similar function in itertools (zip_longest) which would pad empty strings, but that would be quite costly.
Testing with
f=lambda A,B:all(ord(b)-2<ord(a)<ord(b)+2for a,b in zip(sorted(A),sorted(B)))*len(A)==len(B)

for case in testCases.split('\n'):
    print case, f(*case.split())

produces:
A A True
A B True
C B True
DD CE True
DE FC True
ABCD BCDE True
AACC DBBB True
DJENSKE FDJCLMT True
DEFGHIJKL HJLEHMCHE True
IKLIJJLIJKKL LJLJLJLJLJHI True
ACEGIKMOQSUWY BLNPRDFTVHXJZ True
QQSQQRRQSTTUQQRRRS PQTTPPTTQTPQPPQRTP True
ELKNSDUUUELSKJFESD DKJELKNSUELSDUFEUS True
A C False
A Z False
B J False
JK J False
CC BA False
CE D False
DJENSKE GDJCLMT False
DEFGHIJKL HJLHMCHE False
IJKLIJKLKIJL LIJLLHJLJLLL  False
AWSUKMEGICOQY RSHXBLJLNQDFZ False
QQSQQRRQSTTUQQQRRS PQTTPPTTQTPQPPQRTT False
ELKNSDUVWELSKJFESD DKJELKNSUELSDUFEUS False

JavaScript ES6, 117 bytes 116 bytes 111 bytes 109 bytes
(j,k)=>j.length==k.length&&(f=s=>[...s].sort())(j).every((c,i)=>Math.abs(c[h='charCodeAt']()-f(k)[i][h]())<2)

Test Cases

a=(j,k)=>j.length==k.length&&(f=s=>[...s].sort())(j).every((c,i)=>Math.abs(c[h='charCodeAt']()-f(k)[i][h]())<2);
// true
console.log('A A:', a('A', 'A'));
console.log('A B:', a('A', 'B'));
console.log('C B:', a('C', 'B'));
console.log('DD CE:', a('DD', 'CE'));
console.log('DE FC:', a('DE', 'FC'));
console.log('ABCD BCDE:', a('ABCD', 'BCDE'));
console.log('AACC DBBB:', a('AACC', 'DBBB'));
console.log('DJENSKE FDJCLMT:', a('DJENSKE', 'FDJCLMT'));
console.log('DEFGHIJKL HJLEHMCHE:', a('DEFGHIJKL', 'HJLEHMCHE'));
console.log('IKLIJJLIJKKL LJLJLJLJLJHI:', a('IKLIJJLIJKKL', 'LJLJLJLJLJHI'));
console.log('ACEGIKMOQSUWY BLNPRDFTVHXJZ:', a('ACEGIKMOQSUWY', 'BLNPRDFTVHXJZ'));
console.log('QQSQQRRQSTTUQQRRRS PQTTPPTTQTPQPPQRTP:', a('QQSQQRRQSTTUQQRRRS', 'PQTTPPTTQTPQPPQRTP'));
console.log('ELKNSDUUUELSKJFESD DKJELKNSUELSDUFEUS:', a('ELKNSDUUUELSKJFESD', 'DKJELKNSUELSDUFEUS'));

// false
console.log('A C:', a('A', 'C'));
console.log('A Z:', a('A', 'Z'));
console.log('B J:', a('B', 'J'));
console.log('JK J:', a('JK', 'J'));
console.log('CC BA:', a('CC', 'BA'));
console.log('CE D:', a('CE', 'D'));
console.log('DJENSKE GDJCLMT:', a('DJENSKE', 'GDJCLMT'));
console.log('DEFGHIJKL HJLHMCHE:', a('DEFGHIJKL', 'HJLHMCHE'));
console.log('IJKLIJKLKIJL LIJLLHJLJLLL:', a('IJKLIJKLKIJL', 'LIJLLHJLJLLL'));
console.log('AWSUKMEGICOQY RSHXBLJLNQDFZ:', a('AWSUKMEGICOQY', 'RSHXBLJLNQDFZ'));
console.log('QQSQQRRQSTTUQQQRRS PQTTPPTTQTPQPPQRTT:', a('QQSQQRRQSTTUQQQRRS', 'PQTTPPTTQTPQPPQRTT'));
console.log('ELKNSDUVWELSKJFESD DKJELKNSUELSDUFEUS:', a('ELKNSDUVWELSKJFESD', 'DKJELKNSUELSDUFEUS'));

Credit

@rink.attendant.6 shaved off 5 bytes
@user81655 shaved off 2 bytes

Can you use [...s] instead of s.split('')?

@rink.attendant.6, yes, thank you. Still getting used to ES6 and that is one shortcut I need to remember!

JavaScript (ES6), 87 bytes
(a,b)=>![...a].sort().some((d,i)=>(d[c='charCodeAt']()-([...b].sort()[i]||c)[c]())/2|0)

Uses a zero-centric symmetrical range check by dividing by the max value, then truncating with a bitwise "or" (|). Shorter than having to do two checks, or one with Math.abs().

Haskell, 67 63 bytes
import Data.List
f a=any(null.(a\\)).mapM(\x->[pred x..succ x])

Usage example: f "FREE" "GRRD" -> False.
How it works (note: f is partially point-free and the second parameter b does not appear in the definition):
mapM(\x->[pred x..succ x])      -- for each letter of b make a list of the
                                -- predecessor, the letter itself and the successor.
                                -- Make a list of every possible combination
                                -- thereof, e.g "dr" ->
                                -- ["cq","cr","cs","dq","dr","ds","eq","er","es"]
any(null.(a\\))                 -- see if the difference between any of the
                                -- combinations and the other parameter a is
                                -- empty, i.e. they have the same elements

Edit: @xnor found 4 bytes to save. Thanks!

Is id x not just x? Or how about [pred x..succ x]?

@xnor: I started with \x->map($x)[pred,id,succ], so the id was just a leftover. Of course .. beats it all. Thanks!

K (oK), 27 bytes
Solution:
2>|/x*x:-/(|/#:'x)$x@'<:'x:

Try it online!
Examples:
2>|/x*x:-/(|/#:'x)$x@'<:'x:("QQSQQRRQSTTUQQRRRS";"PQTTPPTTQTPQPPQRTP")
1
2>|/x*x:-/(|/#:'x)$x@'<:'x:("DEFGHIJKL";"HJLHMCHE")
0
2>|/x*x:-/(|/#:'x)$x@'<:'x:("AAA";"AAA")
1
2>|/x*x:-/(|/#:'x)$x@'<:'x:("AAA";"AA")
0

Explanation:
First sort each string, then pad to be the same length, then take one from the other (ASCII values of chars), square result as there is no built-in abs, take the maximum difference and check whether that is less than 2.
2>|/x*x:-/(|/#:'x)$x@'<:'x: / the solution
                         x: / save input to variable x
                      <:'   / ascending sorted indices (<:) for each (') list
                   x@'      / apply (@) each (') of these indices to the input (x)
          (      )$         / pad
             #:'x           / count (#:) each (') list (x)
           |/               / max (|) over (/) to get maximum
        -/                  / subtract (-) over (/) to take 2nd list from 1st
      x:                    / save in variable x
    x*                      / multiply by x (so square)
  |/                        / max over to get maximum distance
2>                          / is 2 greater than (>) to this maximum? returns 1 (true) or 0 (false)

Rust, 269 264 bytes
fn a(w:&str,x:&str)->bool{if w.len()==x.len(){return{let mut c:Vec<char>=w.chars().collect();let mut d:Vec<char>=x.chars().collect();c.sort();d.sort();for(e,f)in c.iter().zip(d.iter()){if(((*e as u8)as f64)-((*f as u8)as f64)).abs()>1f64{return false}}true}}false}

Expanded:
fn are_adjacent(w: &str, x: &str)->bool{

    if w.len() == x.len(){

        return {

            let mut c : Vec<char> = w.chars().collect();
            let mut d : Vec<char> = x.chars().collect();

            c.sort();
            d.sort();

            for (e,f) in c.iter().zip(d.iter()){
                if (((*e as u8) as f64) - ((*f as u8) as f64)).abs() > 1f64{
                    return false
                }
            }

            true
        }
    }

    false
}

Test Cases:
fn main(){
    assert_eq!(true,are_adjacent("A","B"));
    assert_eq!(true,are_adjacent("A","B"));
    assert_eq!(true,are_adjacent("C","B"));
    assert_eq!(true,are_adjacent("DD","CE"));
    assert_eq!(true,are_adjacent("DE","FC"));
    assert_eq!(true,are_adjacent("ABCD","BCDE"));
    assert_eq!(true,are_adjacent("AACC","DBBB"));
    assert_eq!(true,are_adjacent("DJENSKE","FDJCLMT"));
    assert_eq!(true,are_adjacent("DEFGHIJKL","HJLEHMCHE"));
    assert_eq!(true,are_adjacent("IKLIJJLIJKKL","LJLJLJLJLJHI"));
    assert_eq!(true,are_adjacent("ACEGIKMOQSUWY","BLNPRDFTVHXJZ"));
    assert_eq!(true,are_adjacent("QQSQQRRQSTTUQQRRRS","PQTTPPTTQTPQPPQRTP"));
    assert_eq!(true,are_adjacent("ELKNSDUUUELSKJFESD","DKJELKNSUELSDUFEUS"));

    assert_eq!(false,are_adjacent("A","C"));
    assert_eq!(false,are_adjacent("A","Z"));
    assert_eq!(false,are_adjacent("B","J"));
    assert_eq!(false,are_adjacent("JK","J"));
    assert_eq!(false,are_adjacent("CC","BA"));
    assert_eq!(false,are_adjacent("CE","D"));
    assert_eq!(false,are_adjacent("DJENSKE","GDJCLMT"));
    assert_eq!(false,are_adjacent("DEFGHIJKL","HJLHMCHE"));
    assert_eq!(false,are_adjacent("IJKLIJKLKIJL","LIJLLHJLJLLL"));
    assert_eq!(false,are_adjacent("AWSUKMEGICOQY","RSHXBLJLNQDFZ"));
    assert_eq!(false,are_adjacent("QQSQQRRQSTTUQQQRRS","PQTTPPTTQTPQPPQRTT"));
    assert_eq!(false,are_adjacent("QQSQQRRQSTTUQQQRRS","PQTTPPTTQTPQPPQRTT"));
    assert_eq!(false,are_adjacent("ELKNSDUVWELSKJFESD","DKJELKNSUELSDUFEUS"));
}

Pyth, 37 31 bytes
&qZ-FmldK.zqY-m.a-FdCmmCkSdK[Z1

Try it online with all test cases!
Shaved off 6 bytes by using the shortened reduce notation (-F instead of .U-bZ)
Solution inspired by Dennis
First submission to codegolf!
Explanation
We can split the expression in two parts, which are compared with & to output the result. I'll try to explain by writing some pseudo-Python
First we check that the length of the two words are the same
mldK.z         lengths = map(lambda d: len(d), K=all_input())
.U-bZmldK.z    diff = reduce(lambda b, Z: b - Z, lengths)
qZ.U-bZmldK.z  diff == 0

Then, we apply Dennis' method:
       K                                                      # ['CAT', 'SAD']
 m   SdK           sort = map(lambda d: sorted(d), K)         # ['ACT', 'ADS']
 mmCkSdK           ascii = map(lambda d: sorted(d), map(lambda k: ord(k), K))
                                                              # [[65, 67, 84], [65, 68, 83]]
CmmCkSdK           zipped = zip(*ascii)                       # [[65, 65], [67, 68], [84, 83]]
m.U-bZd CmmCkSdK   map(lambda d: d[0] - d[1], zipped)         # [0, -1, 1]
m.a.U-bZd CmmCkSdK map(lambda d: abs(d[0] - d[1]), zipped)    # [0, 1, 1]

We then use the - operator to filter all elements of that list that are not in [Z1 ([0, 1]), and check that the result is an empty list with qY

C, 172 bytes
#define q(x)qsort(x,strlen(x),1,c)
c(x,y)char*x,*y;{return*x-*y;}main(a,v,w)char**v,*w,*a;{for(q(w=v[1]),q(a=v[2]);*w&&*a&&abs(*w-*a)<2;w++,a++);printf("%d",abs(*w-*a)<2);}

Test Cases
$ bash -x test.sh
+ bash -x test.sh
+ ./a.out A A
1+ ./a.out A B
1+ ./a.out C B
1+ ./a.out DD CE
1+ ./a.out DE FC
1+ ./a.out ABCD BCDE
1+ ./a.out AACC DBBB
1+ ./a.out DJENSKE FDJCLMT
1+ ./a.out DEFGHIJKL HJLEHMCHE
1+ ./a.out IKLIJJLIJKKL LJLJLJLJLJHI
1+ ./a.out ACEGIKMOQSUWY BLNPRDFTVHXJZ
1+ ./a.out QQSQQRRQSTTUQQRRRS PQTTPPTTQTPQPPQRTP
1+ ./a.out ELKNSDUUUELSKJFESD DKJELKNSUELSDUFEUS
1+ ./a.out A C
0+ ./a.out A Z
0+ ./a.out B J
0+ ./a.out JK J
0+ ./a.out CC BA
0+ ./a.out CE D
0+ ./a.out DJENSKE GDJCLMT
0+ ./a.out DEFGHIJKL HJLHMCHE
0+ ./a.out IJKLIJKLKIJL LIJLLHJLJLLL
0+ ./a.out AWSUKMEGICOQY RSHXBLJLNQDFZ
0+ ./a.out QQSQQRRQSTTUQQQRRS PQTTPPTTQTPQPPQRTT
0+ ./a.out ELKNSDUVWELSKJFESD DKJELKNSUELSDUFEUS
0++

PowerShell, 140 bytes
param($a,$b)(($a=[char[]]$a|sort).Count-eq($b=[char[]]$b|sort).Count)-and(($c=0..($a.Count-1)|%{+$a[$_]-$b[$_]}|sort)[0]-ge-1-and$c[-1]-le1)

Might be possible to get this shorter. It's not currently competitive with Python or JavaScript, but it uses a slightly different approach, so I figured I'd post it.
Explanation
This code is really confusing for someone not fluent in PowerShell, so I'll try to break it down into English as best I can...
We start with taking input param($a,$b) as normal.
The whole rest of the code is actually one statement, and can be broken as (...)-and(...) to test two Boolean statements with the -and operator.
The left-hand parens can be broken as (... -eq ...) to test equality of two objects. In this instance, the objects are the .Counts (that is, the length) of two new char-arrays. Each inner paren ($a=[char[]]$a|sort) takes the original input word, re-casts it as a char-array, then sorts it and re-saves back into the same variable. We do that for both $a and $b. The left-hand side thus verifies that the input words are the same length. If they are not the same length, this half of the outer Boolean statement will fail and False will be output.
Moving to the right-hand side, we're again testing two Boolean statements with (... -and ...). The left-hand side tests whether something is greater-than-or-equal-to negative 1 with -ge-1. The something is the zeroth-element of a constructed array $c, which is created by:

taking a range of the allowed indices 0..($a.count-1)
piped into a loop |%{...}
each iteration of the loop, we take the ASCII values of the indexed character in $a and subtract the ASCII value of the indexed character in $b
which is then |sorted by numerical value

The other side of the statement takes the maximal value $c[-1] of the array and ensures it's less-than-or-equal to 1 with -le1.
Thus, if the two input strings are indeed adjacent, the $c array will be something like @(-1,-1,-1...0,0,0...1,1,1). So the first element will be -1 and the last element will be 1. If they are not adjacent, the difference in ASCII values for a particular pair will either be < -1 or > 1, so this half of the outer Boolean test will fail, and False will be output.
Only if both sides pass will True be output, and the strings are therefore LA.

APL, 59 bytes (characters)
(61 if we have to supply the { and }, 63 with f←)
I'm not the greatest APLer, but it's just too much fun.
(0=+/2≤|¨∊-/{⎕av⍳⍵}¨(⍺{⌈/⍴¨⍺⍵}⍵)⍴¨⍺[⍋⍺]⍵[⍋⍵])∧=/⍴¨∊¨⍺⍵
=/⍴¨∊¨⍺⍵ are the inputs equally long?
∧ and all of the below
(⍺{⌈/⍴¨⍺⍵}⍵)⍴¨⍺[⍋⍺]⍵[⍋⍵] sort both inputs and shape them to be as long as the longest of the two (they wrap around if you make them longer than they are)
|¨∊-/{⎕av⍳⍵} convert both char vectors to int vectors of their ascii values, do a vector subtraction and absolute all values
0=+/2≤ sum up values larger than or equal to two and check if the result is equal to 0

J, 27 bytes
[:*/@(2>|)[:-/,:&(3&u:@/:~)

ungolfed
[: */@(2 > |) [: -/ ,:&(3&u:@/:~)

explained

&(3&u:@/:~) sorts both arguments, and converts to them to ascii numbers
,: creates a 2 x n matrix, where n is the number of chars of the args
-/ subtracts one row from the other, giving a list of length n representing the distance of corresponding chars
(2>|) returns 1 if the absolute value of the distance is less than 2, 0 otherwise
*/ multiplies all those 0s and 1s together: hence, the final result is 1 iff all pairs of corresponding chars are adjacent.

Try it online!