text:
Who's that pokemon (based on its etymology)?
As we all know, most Pokemon are created by combining some English (or Japanese) words; these words are the Pokemon's "etymology." For example, "charmander" is "char" and "salamander" put together.
Your task is, given a Pokemon's etymology and number, output the original Pokemon name. A short answer will be able to compress the 890 Pokemon into much fewer characters by exploiting the fact that the etymologies and the names themselves use mostly the same characters.
Input: The Pokemon number, and an array/list of etymologies, all lowercase
Output: The Pokemon's name, also lowercase
The full list of test cases can be found here: https://pastebin.com/B3rRdiPn. Each line is a test case with the format:
<pokemon number>;<comma separated etymology list>;<pokemon name>

This list was created from https://pokemondb.net/etymology by running the following code:
let collectedRows = [];
let rows = $(".data-table tr").slice(1)
let isOddPrev = false;
// Replacements due to typos, remove 'palindrome' since girafig doesn't come from the word 'palindrome', 'palindrome' is just a descriptor
var repl = {"anacondo": "anaconda", "armadilo": "armadillo", "[palindrome]": ""}
rows.each((_, row) => {
  let isOdd = row.classList.contains("odd");
  let etym = $(row).find(".cell-etym-word").text().toLowerCase();
  if (repl.hasOwnProperty(etym)) etym = repl[etym];
  if (isOdd !== isOddPrev) {
    collectedRows.push({name: $(row).find(".cell-name").text().toLowerCase(), etymology: [etym], num: parseInt($(row).find(".cell-num").text().replace(/\s/g, ''), 10)});
  } else {
    collectedRows[collectedRows.length - 1].etymology.push(etym);
  }

  isOddPrev = isOdd;
});

// Output:
collectedRows.map(pokemon => pokemon.num + ";" + pokemon.etymology.join(",").replace(/\,$/, '') + ";" + pokemon.name).join("\n")

Examples:
The full list of test cases can be found at the pastebin link, but here are some example inputs and outputs:
1, ['bulb', '-saur'] --> 'bulbasaur'
122, ['mr.', 'mime artist'] --> 'mr. mime'
29, ['nidoru' ,'rhino', '♀'] --> 'nidoran♀'
16, ['pigeon'] --> 'pidgey'
17, ['pigeon'] --> 'pidgeotto'
23, ['snake'] --> 'ekans'

Note that due to 'nidoran♀' and its family, you need to be able to handle input/output in UTF-8.
The winner is the entry with the highest accuracy, with ties broken by code length. In practice, this means that the challenge is code-golf -- you need to get 100% accuracy to be a competitive entry -- since you can trivially create a lookup table, but feel free to post a sub-100% accuracy answer if you think it does something creative (someone else might extend it to handle the edge cases).
If you wish, you may also include a data file, and the number of bytes of that file is added to your byte count. This is just if you want to keep your code and data separate.

Why do we take the pkmn number as input?

@RGS It looks like the etymology doesn't resolve uniquely to a name, 16, ['pigeon'] --> 'pidgey', 17, ['pigeon'] --> 'pidgeotto'. So, sometimes you need the number.

@xnor maybe it would be interesting to only take etymology as input and let the solutions return any of the possible names when there are several Pokémon with the same etymology

What is accuracy here? Name completely right Vs name completely wrong? Or are different mistakes weighed differently?

Waiting for a Pyke solution.

Seeing as there are already solutions, it's probably too late to want to correct this, but Slowpoke and Slowbro have weirdly repeated etymologies

I think that the ♀ symbol is unicode, not UTF-8

JavaScript (Node.js 11.7+), 100%, 2094 bytes
Same as below, with the data file compressed with Brotli instead of zlib.
n=>a=>(require('zlib').brotliDecompressSync(require('fs').readFileSync('a'))+'').split`/`[n-1].replace(/\d.\d?/g,([i,p,l])=>a[i].substr(p,++l||9))

Try it online! (not working on TIO)

JavaScript (Node.js), 100%,  2176 2158  2151 bytes
This is similar to the self-contained version below but uses an external data file of 2010 bytes named 'a'. The TIO link generates a local copy of this file.
The final size was computed according to the rules for scoring multiple files:
$$2010+140+1=2151$$
n=>a=>(require('zlib').inflateRawSync(require('fs').readFileSync('a'))+'').split`/`[n-1].replace(/\d.\d?/g,([i,p,l])=>a[i].substr(p,++l||9))

Try it online!

JavaScript (Node.js), 100%,  2701 ... 2359  2356 bytes
Takes input as (id)([etymology0, etymology1, ...]).
The source contains many unprintable characters.
n=>g=(a,i=2,s="aZOEDQ]^4+24><e_<ZZ)aku[XdFyXdttoXdt|63a%}5ks/arbok_[__S♀E2a_S♂E_]]Sx_Sy`SytuffS[K~_SB]NO[h~[]?4PS@NB;2ZW)H~~pBR_]3!AA[r~?6G/@W@GA;5'dOOXel?3U~rXk~d,/!Z%~/@82arXix_S)ZD_~?3=I?3=CO;ak*@*@&tuV2)offHUXy`Xy`WseyWelaSs18/Ta*R[WyuWmie4~r/jyUS(~r[WosWkZXarados/lapras~eveeG_NXrT/omy/om(~~ps}5_XT3`[]*i&te[~P2Z[2efD/cyF(4]Q%NB4r>KW_/leledikXi([0Tu_$~f0,`Ye`Ye`/n/x`MXZ!ORR+22T3`oed[]]/ai!/2HV2^3~J_[_]W@+vXP]SarigWH2K3P+ce*&x/qwF`YzH2>Y(QW_M5]N+KW@]$NN`2K4XrT42OBR*@~um[M[y[2u~cZeWYSXgiho-ohWbiRWy,>E2^4C;3NBN^4%euFVM<17M]2|6XV4N3	SryD]Q/TtsJG+~8VA/U4,VE[ME]]2dEWH~]Q~[NOXVRRN<CQ5~leWn[Jse~lJQYvIQail`3aK]Z$NQ]B/3T3YnZ2e]2[/z=IO	],/corphH_[M3]Y2I?4ldo]2/4I/P4`)ec,XZ}7RMNSyut[KR]]2n/@eI]]{64/luv`XIQ{VC/P30TR__]_YiZYiZ)yogre_*zjir01Ss]K]_MO_KSy]XdZ2f|VCL6ZL6ZWx&oMONAA/buVZ]/H4Z{TnGXizC~zC?7{6{VW!Q[yO*iISkZ	M?2Uy_>N]Sjr.]]A/gZ@6$[E/=olu/luca=o~sE222kFuP2%_NA[N]MWa0b4[S&yXyV]SivZ]_]3__+Yo`XrT-zBB__/r0Im/uV$5/az`Ylgpalkia]3_QiphV~phyRYyminOni$[>WgMO/oshaw!*{TW=S<pDGQK###XnV2?5r222$~lYez,>[5aXggen3aXT2`	__2Wr/guFr`3rDAWhawkMWlI]%>DJeeS4|VZ2Y0UIK5)=ko=kL4C^3;niBM>~QEO|72ri18/tiFoPYF`WenWH3sXZ_YuaYoZYccV/ccV>QSt18DME2,]~Jite^3^3]aws`0UlH)FT3ZR/fooUYs{6/alo0U0P&k^5GGLLL4ZXVkC3kkC222lgyem/beheeyem[D<Z~wYxHXxo24MQQ2rk~fooXZ3iTQOQRJlHRK^IWH3]/doQ?4F23]ENSkZWzZASZ$4am~kVm~ormM}53aR}53BGRNK2ieD]Dby~sby^5AG<`RD[O];M3sQR+++OR]ENe<V&xNMK4XI^4kFVeMerQE>OBY082a?50aYv`[5X0TneRKYg`*LkiEMSa17	M/xZ3eas/Z3lt25/zy`Yncie~aA/VRKW(<Z~pC3}5Xk2k_^3/yC3^52?7Wj(Xk(]R8Yc0PGO321_{T4iO[[|5OO3H/fo`ONW23RR~ul/!01_/H5072RaWey]D]GYos`/py=17@Vu~: `_D?2FIQ~de`Wkyu]K/d`4T-o-oL4-o3o~ V4iSg{UYg(]G]<V/xkH3eeaXrUNXcT2zC$[[_a=ka[7nYaZ	Qy/U5`_OK{7{6kwZB{6GG_lerO&t{VWW=/dF`Q;2VXIRFolQnRGRDWk{P07[2%>SskVB3<aSanremZ&@1]3~m`SgC/pZ2V]3%5'd~ riI~rig17K|Vmie/fF,Ym_RisP2eJT2%~f,A~zZWozZ~vZWovZAXVZQ/zaciU/za0UzTJtus~/}W1|Y1{S1`10_}0^J1]}1[|0Z11Y~3X~2W~4V12U0!03S~5R}2Q}3P04O|1N{1M|2L)01K|3J~6I13H05G{0FU2E{2D}4C14B{3A^1@20?/`>{4=0V<~7;YP,15+[4*[3)/k(a`&~i%|4$X`#/P3`_!2Ti`J`_3U3~eYk{5_4/T4~ `Z;20006/wa/09/s^2}6_2	][16na/eanur~tWi")=>i<127?g(a,i+1,/[\r\n "'\--:\\a-z]/.test(c=Buffer([i]))?s:(l=s.split(c)).join(l.pop())):s.split`/`[n-1].replace(/\d.\d?/g,([i,p,l])=>a[i].substr('0x'+p,l||9))

Try it online!
How?
Each name is encoded as a sequence of sub-strings from the etymology words, with some possible hard-coded characters in between.
Example:
For the first name, we are given:
n = 1, a = ['bulb', '-saur']

The name bulbasaur is first encoded as 004a114, which is interpreted as:
'004' -> a[0].substr(0, 4) -> 'bulb'
'a'   -> hard-coded character 'a'
'114' -> a[1].substr(1, 4) -> 'saur'

But the length of the sub-string is omitted whenever this is possible without resulting in any ambiguity. When the length is omitted, the decoder assumes that the word must be read to its end.
Both lengths can be omitted in this case, so the final encoding is:
00a11

All the 890 encoding sequences are concatenated together, using / as a separator. This results in a string with a lot of repeated patterns which can be efficiently crushed:
00a11/00211/00412/00314/00313/00311/00514/00210324/00414/006e/00310/.../za001z03/005tus

Since the etymology often follows the order of appearance in the name, I wonder if the etymology index can be omitted, e.g bulbasaur is 0a1?

@SurculoseSputum This is an interesting idea, but I was not able to successfully implement it so far.

You can save a byte with ++l||9.

@Shaggy Yes, I actually have a pending 140-byte version including this optimization. I was waiting a bit for a slightly more significant saving, but I'm not working on it anymore so I will probably commit it.

Python 3, 100%, 3817 ... 2463 2351 bytes
import base64,bz2,re
def f(n,e):
 s=re.findall("[A-Z].+?(?=[A-Z])",str(bz2.decompress(base64.b85decode("LRx4!F+o`-Q(2lYjJyB>_?>`2gMW}e@IU|m@L&gzfB<{l>MaducV>;xcV1v3r}_v9qd}l1g$bb0WFnp>O&STHDd{yaqyPYlr~6YAQwdMh*(7?5KmarbspRyU5D6YB>Ux_~Kpvn20BND4Mk62^05mXaen^xm000000ENyXhobxV`;X?{ExyPLkgLKDP|*Q^?o*e5XuP4M=5UaiAd|`2;!L-!vGCJPj#;Mo=2>TVCBV{l6DI6B_r0dGFBRQ-O|~`xNM7ayY%9|*JDHKx)H%`3m$P%bfxU(EeEGzleQ$#&o^1*0>`mQyWinz&K_h&|r)n^J<>jzrwUxNpN$qXir0}FVs_7L(Ks|=pmD2iIahTy>RB*k9#U=BSIWVqS3gGbVZpVtyD8dEs&<v#@cP}dhn`W7qib`>cvCEjl7e+vZP!cd9feP7KUJ||~0FQFad}w6bGbS;17~RfNW=AZ-?8t28AOz_wt~OR85Loar%*#lVF{BpPkTAlKBBJq&5IIzogmT3wP=ZP{!d>aETG<_DSc2Oj4duuj%a?ggAaH<lR3|AC9N>Wyq;np^W5Gyus`ED9MYY}3laCeQ@R052^8Lt6chhHS=PKG_o@*~ICBX~8XnxM69}KpBRk}!|Nkn*aP*I+cKKWij;l3&FfZofSuJl}P%9C^dABC%JEw(S#R(||vwYR%OltbAF<bRs2UeKzeXleyw=czoWGHjSn^SmprWPH?|!-=07#O)v9FyZb)D!mGeg_aEbQnWd~Sv^0$(U>TLiQx_d0ZJEj?In+L@`K%YQUM1cbI1*C-ukR(DngIFmkJ^qE)Dc7>Wf?`7`YWLwM+J3Hpu`;F&p=WjHW=<cygYHc+}GOFgXO0=*q=k*RxL<?d{EH8V4g`oTFz#A1JX|L%1mW4s9(}kh|5%etRW3y*^(Q&Mub5?StGw?m&hT`PpTVGkv0+%N&w8d?ggL)Ky9rZ8uH0a~(k|k`(~|tJR@r`Py({Cly12W3l@e49in_AV<B$_48M82_#A8ioZF>x|_<d(GLXB%jJ#EoKM06qbF(%n-K(Rh5e30T@Lbt{U*=!(Vcc#m4fBN7PDDvY$Pv4VTb{T(kB_s=w_u*#yj&@6l`rQXuD>`3P==#x=l$E<$n%q;IJ`mp-930B+gn;Bw~$S@uKjrO%gEn=_!H>jn55^PfqZnK$wh^Q%|5gfsZ)n9|~pWd!n2xtMt2I+?2ybbWX#r;c3lwdR<%>6el#lge`*LM&McY@3Y(8$TKqOuoJnn4{kGvOY`c!@j7RIPUnBgv;NFWAAR3qb%r^dGr@IwwatK&meM}r5|G_r#F3<P+>Nzy0!bbI{4>gVo26MfTFI`C@jc8zgpXx@Eu<fGa<wX6eL_2i8;e3I;@L&r?bvJ&n9*mM$TElv(p5-@<V|c)7Hh_mrIE^YW36V^x@rbi>N9>_?WJ(ii7B=8@~z_)Zl+NInDcLe&b(UFUJoeXew<(w$4#fgQ*fF{D3~kj6vA}cEN9}xk}Ir+0Vg_L^9n-^vcK5|CIvx|znAi67u1Qo_x6j*K7CT**02u68QTS=v(l;tc&k3OHuc0|C|js)<DE)X04p&I%}|W-9UO;KGP$#5p9i@xrhM?-wd^{M==!3!eCtaBfyiZOyT#Z^3ERpfx}!MSu`4>PT~-A$yuO=4(hifs0Km6AkP+jd_0jSi3#ItzIy8y!Q{W$crxZ*Z*)QlMCV)VYI@mq{>v-ooMA$^@MqM5!5Gp9(wn0o=t=X)0EVIjJfhjdmfsDEjj-ge71G&1nz{?F-UqFQ!Ui_ylWX9VVX~g9$*qLc(M;YIknZP~9Iqz)r`19X%(%&7^tyi<i09Sx!2&v&7?OPu^wjVl&4RkTK`0EIzahitH>(Z=jE!=0TrmYUTXk!@-0EVT7Z$Dk^k?mU9s=n!;sXeJgsmArC7?v`d>o?r3z7o;iEO1Fh%AJ{a43j`h@{VSzjQ2rV6BP@&gj9>5W^oRe^l@a-MKjx!_Em$F2!;9_1iF}v7FOAU5MhebG!cm!#tDiAHx_=BBoyR~nT-<02#y;N1qH_>8^t3Gu2k+kP#9cRS>VnNLqLE|Fyulvo#`c=FH6J$2A-0V!(nsHf$#pb$SzC+bx%8>H$mCL5MtK&@WCh^k#Bi<=$%9ljrqSIqYVXCLeT0UO8{)!sRB>f->^P%M|mf^+&6ALwl)hsRm$4<rgGU<1DfY8|KjdQrwS4iMiG~Q"))))[n-1]
 return e[:ord(s[0])-65]+s[2:]+e[len(e)-int(s[1]):]

Try it online!
Explanation
We could print all of the Pokemon with just the number, but the etymology allows us to improve the compression algorithm. Take the first input: 1;bulb,-saur;bulbasaur. The first etymology bulb and the actual Pokemon have a common prefix. Most Pokemon in the list also have this property. So instead of compressing the entire name of the Pokemon, we only compress the right half of it (asaur in the example), starting from the longest common prefix of it and the first etymology. Then for the left half we can just directly take a prefix of the first etymology (bulb in the example). We also precompute the longest common suffix to further reduce the size. Then, we will encode the string like this: 44a. The first and second characters represent the longest common prefix and suffix. The rest represent the rest of the characters not accounted.

I think changing base64 to base85 could shave a few hundred bytes?

Good point, I didn't even know that existed! :P

Python 3, 2526 ... 2485 2477 bytes
import bz2,zlib,base64
b=base64.b85decode
p=bz2.decompress(b('LRx4!F+o`-Q(59BF!%rhj7R`*0Ds_61b*t7X+T7%iw!XbsxUw_05wnA5{ieYKr{d~PxKN}nvw5(BOjwtq%XftFY)%vlw$tuZI%9;4^7W^?|qN$^KHzUfTa1Tr63Y7r1jva6}^`q2S@hzE%f$eIEbHP$OqG_3SuF>V&&a2$k(oE#{VBmKW+Svm$v*~C^qWuF)k0y?|H~yTPf~!?wrgjhb&<eM^-^OI;(1`q-?Z<qzNrohfQ{Dj81Xiau!gFnMm=jU$kb-uz}rmWO5((Vh03kk%%mYEuZmlvGX6_$^WzTJCh7Hy+7CHc=YRx{QgoqG>`7FyT+mj+KfPl(=}z5nkicW9_jyi#oUj+1pt2Zy5~V&)(O@NB3@G*YRp{Y5yh8F(mPfTzhcqIpQWOApqcBDH-sdIW9L_on;F8Z)_fm*IYekeJSOk9WfqRg+zu5(LBP!vy{<xI$>jOvYGP%sVU+fDc7*izAgV1MIwhk+37)dQtR$ut3@6&%$XyH0BBLm<c9>%GPa=!bg{V#uL4%RsD6#`A-;@5%7)~}vs<Cp)eUFlBHiXIb^TiL*!_9AEc(vE!gk3-ylSFvc9vStpc27mncv+2CeeuQ%MU;U9O-dsn8Ci0wMK?I^3jC_H?kx3)h>VA_!Qw8oGiG|0{qDzI_ao-fMT~Eq(t=11(jj~sTAf+6HxA=oo9lM4X||FImXnI)Ec3xrnEb5)&dqGmLA63lR0gb2;&FLHyOcyVeFSa|%FBDJbqz)`MO*^0^yx-={jS1pqP`l6adD$JFUKx0o9E4AS+)~2vdwIDIO4(M@rF{8{Pa%t<<&k`uiatcw!sYaM2Dk_jjI|#ZFbtwNHBtD!axZ5{r;2nc)gx7J<4#**_%xXq9=l^O%(e%P}<T!l2*mtVtNR28TAS<P1US-rrh{l$rRy2Lx`Be-~')).decode()
f=lambda n,e:e[:int(p[n*2-2])]+zlib.decompress(b('c$`&LLAIkf47^G<db8?T%yMocKrwC`L>oK#<n&WzC%=10Fg#-{RjE{{jH9}U@g`|%yNWEqE)HJts9&XORW7ll`zcx`PyJopCGOuB9+zCT-S6_pQP;6F^(e9bB)uONv#HNp!Ac#IcdPUI7bnG@!S^6|xQJhv3bqI34r7Zi3t<f6PnFI0e#YAHR&r*7l;i{?%POa=UQSb4iuP=`D7P(ch6tB%%CWB&T^u+MF0zO91dI5l`^8b@I0-DyecX{vtX!15NapfuU-Vat9Zd{c`;9Hvq!=UkLWm?0JH>roy%97}g^(|T7P6^&zhAOyaRx)wvn~E~UmP`ibD2onAkv@UsF*$)murbZW(U8u*m=r%XqhEw!An!ic?{2(<%OJyoXO5w0^}g4XZ@6qOdYH4M<1nJD9As2K%QI2bpbf;=C<3rz5&quhp#e4vMgi@*~Vk+>5i4HZ2kTVTTR8pGeehaz|mZZ<4lp{;d%Z;GxEP<UKKmdwIE9F+?|p!{{XI-H&CSCdI8Uw2(YRkhm5pe1L};7%R#MzV6%f2*Svt54J^%iR<ZdL^4hhHnnpRS<SuXsy*)U$%Vc?J+gM9JE)UH5S5rj$8H=31(}(UJRKntZN3;YOXqERx;%8ZtCo47khHWtal9x2n+vOosj+>a0zD+|MXzNJwXZd?1Lh_;mbZ#hh1m90;wjJM5dJn{m*jKMx#}inH8PR=||HoT#6}dD>tDr{ul8naGoPeb$1$<hL)DHi0ZS0c$6X;y^34@W(`92Q5_<PvlM`!@LlGqDxp~guizyt~<it-S8124NnQ1~wx6WQ;Lv5KNC@+cL=IWrdEWyukG&9tpl92_{Wv^6yOHyaw*MzO#M(FLfhdGGuNt;jsHdAkKrJ_v$5hYuj?DYiK@tA!@wF0irDnb|iVwMhISheT&3G+y9S;WE^6HRF}X7tnlpzYQqEUGCTr6aw?IM9P^*h6KA(UN1B!Efcw{7fj(D4GdzVbBzTJ1GpO$k8VN?tMuOE<KmhkVOXAEozrirN(r1F4JRK~C4TXpO-XrT*92*>wU0M7M1{ysG$eGl!hCIKpwPV~WxJ<1lsAo646Uj1uw0?ReMT<IZX9clOx@B;m<nv((E#{QNd70bBimctb%GVlyr)u8s;2_@NC<7XM|@A->A?q$xu4Z+2Of+{Q|kwIzFKM<PWku7z}ykcCN5YlZ}BwH{iC0F$jdE3QgX|N9By*Ecin^Mpr3NW)=Ccr6|<|0zwl{$OC2Dp0?2Hz+>GjukMD)%&ELkHp5t0GNkaz$2aMNY_7F##_{F4MWV*9_f1ndA)t(CgvMWwV&*w^|TcpFW<0>VAHd*3!ba^0gexKQK?@#lsL}6?2G0KB)*DRC-Hkn)31U|ek0jP)gqlbmh&Jn`~r>GFaf062$Ap')).decode().split('%')[n-1]+e[len(e)-int(p[n*2-1]):]

Try it online!
Based on idea of @dingledooper (thanks!), but making it a step further by using the longest common suffix to help as well. Also used zlib & base85 to further reduce size a bit.

Pyke, 100%, 835 bytes
Sorry folks, Pyke contains a built-in Pokémon dictionary. Unfortunately, it only contains up to #802: marshadow, so 88 names had to be hard-coded.
Should work for all inputs, but the TIO environment seems to have a slightly different version of Pyke than on the "Pyke Interpreter" website, so inputs greater than 802 only work on the latter (see below).
Q0@802>"poipole,naganadel,stakataka,blacephalon,zeraora,meltan,melmetal,grookey,thwackey,rillaboom,scorbunny,raboot,cinderace,sobble,drizzile,inteleon,skwovet,greedent,rookidee,corvisquire,corviknight,blipbug,dottler,orbeetle,nickit,thievul,gossifleur,eldegoss,wooloo,dubwool,chewtle,drednaw,yamper,boltund,rolycoly,carkol,coalossal,applin,flapple,appletun,silicobra,sandaconda,cramorant,arrokuda,barraskewda,toxel,toxtricity,sizzlipede,centiskorch,clobbopus,grapploct,sinistea,polteageist,hatenna,hattrem,hatterene,impidimp,morgrem,grimmsnarl,obstagoon,perrserker,cursola,sirfetch'd,mr. rime,runerigus,milcery,alcremie,falinks,pincurchin,snom,frosmoth,stonjourner,eiscue,indeedee,morpeko,cufant,copperajah,dracozolt,arctozolt,dracovish,arctovish,duraludon,dreepy,drakloak,dragapult,zacian,zamazenta,eternatus"\,cQ0@803-@&Q0@~_+1-.ol1|

Try it here! (This site doesn't seem to support unicode, so output for nidoran♀ will be in UTF-8)
Try it online! (Supports unicode, but throws an error for inputs > 802)
Takes input in the form [1, "bulb", "-saur"]
Some relevant portions of the program:
Q0@

Read from STDIN, ignoring everything besides the pokemon number
Q0@802>...&

IF (pokemon #) > 802, Do the following:
"poipole,naganadel..."

- Using this long string of hardcoded names,
\,c

-- split on commas, and
Q0@803-@

-- return the name at index ((pokemon #) - 803)
Q0@~_+1-...|

ELSE: Find the index of this pokemon in the dictionary
.o

- Lookup in the built-in pokemon dictionary, and:
l1

- convert to lowercase, implicitly print


text:
Spanning paths in a tournament on n nodes
The goal of this challenge is to extend the On-Line Encyclopedia of Integer Sequences (OEIS) sequence A038375.

Maximal number of spanning paths in tournament on n nodes.

A tournament on \$n\$ vertices is a directed graph where for each pair of vertices \$(v_i, v_j)\$ there is either a directed edge \$v_i \rightarrow v_j\$ or a directed edge \$v_j \rightarrow v_i\$.
A spanning path or Hamiltonian path is an ordering of all of the vertices of a graph, \$(v_1, v_2, ..., v_n)\$ such that there is an edge \$v_i \rightarrow v_{i+1}\$ for all \$i<n\$.
Example

In the above tournament, there are five Hamiltonian paths:

\$(1,2,4,3)\$
\$(1,4,3,2)\$
\$(2,4,3,1)\$
\$(3,1,2,4)\$
\$(4,3,1,2)\$

Moreover, it is not possible to construct a tournament on four vertices with more than five Hamiltonian paths, so \$A038375(4) = 5\$.

The way to win this fastest-code challenge is to write a program that can compute the largest value of A038375 deterministically in under 10 minutes on my machine, a 2017 MacBook Pro with 8GB RAM and a 2.3 GHz i5 processor.
In the case of a tie at the end of ten minutes, the winning code will be the one that got its final value fastest.

C++ (gcc), \$N=10\$
#include <algorithm>
#include <iostream>
#include <vector>
#include <cstring>
#include <ctime>
//a rewrite for vector<int>
struct vi
{
	int l,a[9];
	const int& operator[](int u) const {return a[u];}
	int& operator[](int u) {return a[u];}
};
bool operator < (const vi&a,const vi&b)
{
	for(int i=0;i<a.l;++i) if(a[i]!=b[i]) return a[i]<b[i];
	return 0;
}
bool operator == (const vi&a,const vi&b)
{
	for(int i=0;i<a.l;++i) if(a[i]!=b[i]) return 0;
	return 1;
}
std::vector<vi> g[13];
void dfs(int x,int u,const vi&c,int*w)
{
	++w[u];
	if(c[x]&u)
		for(int o=c[x]&u;o;o^=o&-o)
			dfs(__builtin_ctz(o),u^(o&-o),c,w);
}
void dfsf(int x,int u,const vi&c,int*w)
{
	++w[u];
	if((~c[x])&u)
		for(int o=(~c[x])&u;o;o^=o&-o)
			dfsf(__builtin_ctz(o),u^(o&-o),c,w);
}
int main()
{
	g[0].push_back(vi());
	for(int i=0;i<9;++i)
	{
		for(auto t:g[i])
		{
			int m1=0,m=0;
			for(int j=0,r;j<i;++j)
			{
				if((r=__builtin_popcount(t[j]))>m1) m=0,m1=r;
				if(r==m1) m|=1<<j;
			}
			for(int e=0;e<(1<<i);++e) if(__builtin_popcount(e)>m1
			||(__builtin_popcount(e)==m1&&((e&m)==m))) //ensure the node has the highest degree
			{
				vi u; u.l=i+1;
				for(int p=0;p<=i;++p) //enumerate position
				{
					bool s=(p==0); int x;
					#define yield(l,c) do{if((x=(c))>u[l]&&!s) goto skip; else s|=x<u[l],u[l]=x;}while(0)
					for(int a=0;a<p;++a)
						yield(a,((t[a]>>p)<<(p+1))|(t[a]&((1<<p)-1))|((!((e>>a)&1))<<p));
					yield(p,((e>>p)<<(p+1))|(e&((1<<p)-1)));
					for(int a=p;a<i;++a)
						yield(a+1,((t[a]>>p)<<(p+1))|(t[a]&((1<<p)-1))|((!((e>>a)&1))<<p));
					skip:;
					#undef yield
				}
				g[i+1].push_back(u);
			}
		}
		std::sort(g[i+1].begin(),g[i+1].end());
		g[i+1].erase(std::unique(g[i+1].begin(),g[i+1].end()),g[i+1].end());
		int sz=g[i+1].size();
		std::vector<vi> h(sz);
		#pragma omp parallel for
		for(int w=0;w<sz;++w)
		{
			vi u=g[i+1][w],v;
			auto sw=[&](int x,int y) {
				std::swap(v[x],v[y]);
				for(int s=0;s<v.l;++s)
				{
					int&o=v[s];
					if(((o>>x)^(o>>y))&1) o^=(1<<x)|(1<<y);
				}
			};
			for(int x=0;x<=i;++x)
				for(int y=x+1;y<=i;++y)
				{
					{v=u;sw(x,y);u=std::min(u,v);}
					for(int z=y+1;z<=i;++z)
					{
						{v=u;sw(x,y);sw(y,z);u=std::min(u,v);}
						{v=u;sw(x,y);sw(x,z);u=std::min(u,v);}
						{v=u;sw(y,z);sw(x,z);u=std::min(u,v);}
						{v=u;sw(y,z);sw(x,y);u=std::min(u,v);}
						{v=u;sw(x,z);sw(x,y);u=std::min(u,v);}
						{v=u;sw(x,z);sw(y,z);u=std::min(u,v);}
					}
					{v=u;sw(x,y);u=std::min(u,v);}
				}
			h[w]=u;
		}
		std::sort(h.begin(),h.end());
		h.erase(std::unique(h.begin(),h.end()),h.end());
		g[i+1]=h;
	}
	std::cout<<"pre ("<<clock()*1./CLOCKS_PER_SEC<<"s)\n";
	for(int o=0;o<=9;++o)
	{
		int mx=0;
		const int s=g[o].size();
		#pragma omp parallel for reduction(max:mx)
		for(int t=0;t<s;++t)
		{
			int a[9<<9],b[9<<9];
			memset(a,0,sizeof(int)*(o<<o));
			memset(b,0,sizeof(int)*(o<<o));
			for(int i=0;i<o;++i)
				dfs(i,((1<<o)-1)^(1<<i),g[o][t],a+(i<<o)),
				dfsf(i,((1<<o)-1)^(1<<i),g[o][t],b+(i<<o));
			int r[9][9],c=(1<<o)-1,vx[1<<9];
			for(int p=0;p<o;++p)
			{
				int*A=a+(p<<o),vn=0;
				for(int x=0;x<=c;++x) if(A[x]) vx[vn++]=x;
				for(int q=0;q<o;++q) if(p!=q)
				{
					int*B=b+(q<<o),su=0;
					for(int u=0;u<vn;++u)
						su+=A[vx[u]]*B[c^vx[u]];
					r[p][q]=su;
				}
			}
			int m1=0,m=0;
			for(int j=0,pc;j<o;++j)
			{
				if((pc=__builtin_popcount(g[o][t][j]))>m1) m=0,m1=pc;
				if(pc==m1) m|=1<<j;
			}
			for(int i=0;i<(1<<o);++i) if(__builtin_popcount(i)>m1
			||(__builtin_popcount(i)==m1&&((i&m)==m)))
			{
				int tot=(o==0);
				for(int j=0;j<o;++j)
					if(i&(1<<j))
					{
						tot+=a[j<<o];
						for(int ii=c^i;ii;ii^=ii&-ii)
							tot+=r[j][__builtin_ctz(ii)];
					}
					else tot+=b[j<<o];
				mx=std::max(mx,tot);
			}
		}
		std::cout<<"a("<<o+1<<") = "<<mx<<" ("<<clock()*1./CLOCKS_PER_SEC<<"s)\n";
	}
}

Try it online!
Compile with g++ and -Ofast -funroll-all-loops -ffast-math -fno-stack-protector -march=native -fopenmp. Note that OpenMP is used for parallelism.
Output on my modest computer:
pre (5.217s)
a(1) = 1 (5.218s)
a(2) = 1 (5.218s)
a(3) = 3 (5.219s)
a(4) = 5 (5.221s)
a(5) = 15 (5.221s)
a(6) = 45 (5.222s)
a(7) = 189 (5.223s)
a(8) = 661 (5.225s)
a(9) = 3357 (5.318s)
a(10) = 15745 (18.634s)

The run time may differ a lot because of the use of OpenMP parallelism.

Explanation for \$N=9\$ version:
This code is two-fold. First, it will try to generate all tournament graphs up to isomorphism. Then, it will count the number of hamilton paths on these generated graphs. Adjacency matrices of graphs are stored as arrays of bitmasks (i.e. arrays of uint) for performance reasons.
The second part is relatively easier. We can just use depth-first-search to search for all possible paths and use bitmasks to speed up. The time complexity is \$O(\text{no. of paths in all graphs})\$. It's also possible to use bitmask dynamic programming to do it, with \$O(2^NN^2)\$. The above code used the former while the latter one should be faster when N goes higher. OpenMP parallelization is used to speed it up.
The first part is harder. My approach is incremental: first generating all tournament graphs of \$t\$ nodes, then add one node to be tournament graphs of \$t+1\$ nodes. The trick here is to find an order for adding nodes. Here, instead of adding any node, we restrict the added node to have the greatest degree in the result graph. Therefore, a graph won't be generated too many times.
Graph-isomorphism isn't a easy thing to check too. Therefore we're not really trying to make every graph unique, but to have some degree of tolerance. I have two strategies used here. First, the newest \$t+1\$-th node won't be directly assigned number \$t\$. Instead, we try all the possible numbers from \$0\$ to \$t\$ and take the result graph with the smallest lexicographic order (you can use early-stopping when comparing lexicographic order, so not much overhead). After generating all \$t+1\$-node graphs in this way, we remove the found duplicates by sorting and making them unique. This alone can cut down the number of found graphs for \$N=9\$ to around \$3\times 10^6\$.
The second strategy is that, after found such candidates, we further try to remove duplicates by trying to swap every two nodes and see if we can get a graph with smaller lexicographic order. We then proceed by sorting and making them unique. These two strategies cut down the number of found graphs for \$N=9\$ to around \$10^6\$. (This strategy alone is more powerful than I thought, cutting down to around \$1.1\times 10^6\$)

Explanation for \$N=10\$ version:
Some improvements are made upon the \$N=9\$ version. First, instead of swapping two positions, three positions are swapped to achieve a better result. This successfully cut the number of graphs generated at \$N=9\$ to less than \$5 \times 10^5\$ (~50% improvement). OpenMP parallelization is also introduced here to speed up.
Generating all graphs for \$N=10\$ sounds unfeasible, so instead I try to expand the last step. We still try to add one node for graphs with \$9\$ nodes, but instead of actually generating these new graphs, we can actually count the hamilton paths in them directly!
Consider the relationship between a hamilton path and the new node. The new node can be the first end of the path so we need to find an edge from the new node and continue the path from that node. The new node can also be the second end so we can find an edge to the new node and trace back the path starting from that node.
Of course, the new node can be in the middle of the path. In this case, we can enumerate the two nodes in front and on the back of it. We can then enumerate the subset of nodes both halves of the path contain and then multiply them to get the result.
Notice that the contribution is the same for every pair of nodes adjacent to the new node regardless of other edges to the new node, so we can get that precalculated for every two nodes.
In order to get the number of paths starting and ending on each node covering a certain subset of nodes, we can use depth-first-search from each starting and ending point. (A bitmask dynamic programming could work too, but I guess it's slower)

I have tested, and dynamic programming with bit masks seems to have approximately equal performance for N=9, but should scale better for higher N.

You mean the second part? Yes, I also tested it, it's roughly as fast. @mypronounismonicareinstate

I am even worse: I also hate using namespace std;. For some reason I was trying to swap 3 nodes instead of 2 right now as well.

Finally $N=10$ in TIO :D

Really fantastic work - can't wait to see the update on A038375! :D

I want to see it with Clang.

I don't really have Clang installed in my computer, but it seems to be super slow in TIO's Clang. Maybe some other compiling option is needed in Clang (I have 0 idea about how Clang work, sry). @S.S.Anne

-O3 with Clang generates much better code in a lot of cases. I don't think -Ofast is supported.

JavaScript (Node.js), \$N=8\$
Simple brute-force. Finds \$a(8)=661\$ in approximately 45 seconds on my laptop. Computing \$a(9)\$ with this code would take several hours.
function search(n) {
  let m = Array(n).fill(0),
      max = 0;

  function count(m) {
    let res = 0;

    for(let y = 0; y < n; y++) {
      (function path(y, visited) {
        if((visited |= 1 << y) == (1 << n) - 1) {
          res++;
          return;
        }
        for(let msk = m[y] & ~visited, b; msk; msk ^= b) {
          path(31 - Math.clz32(b = msk & -msk), visited);
        }
      })(y);
    }
    return res;
  }

  (function build(x, y) {
    if(y == n - 1) {
      max = Math.max(max, count(m));
    }
    else {
      for(let j = (x == y + 1 ? 1 : 0); j <= (x == n - 1 && !y ? 0 : 1); j++) {
        m[y] = m[y] & ~(1 << x) | j << x;
        m[x] = m[x] & ~(1 << y) | (j ^ 1) << y;
        x + 1 < n ? build(x + 1, y) : build(y + 2, y + 1);
      }
    }
  })(1, 0);

  return max;
}

Try it online!

Awesome, I didn't expect brute force to be so effective here! If I understand your code correctly, you try every tournament graph. You may cut the recursion tree substantially by assuming that the nodes are sorted by outdegree.

source: Stack Exchange

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

sort: votes


text:
Find a Similar Number
We consider two integers to be similar if, when written in decimal, have the same length, and if we compare characters in any two positions for both decimal strings, the comparison results (less, equal or greater) must be the same in both strings.
Formally, for two number that can be written as decimal strings \$a_1a_2\cdots a_n\$, \$b_1b_2\cdots b_m\$, they're similar if and only if \$n=m\$ and \$a_i<a_j\ \leftrightarrow b_i<b_j\$ (\$\leftrightarrow\$ means if and only if) for all \$ i,j \in [1,n]\$.
For example, 2131 and 8090 are similar. 1234 and 1111, 1234 and 4321 are not similar.
The challenge
For a given positive integer, find a different non-negative integer similar to it. You can assume at least one such integer exists.

Your implementation shouldn't be too inefficient. It must be at least able to pass the samples in around one hour on an average computer. (If it doesn't end in a few seconds, consider providing a screenshot running it)
Your code can take the input and output as integers, strings or lists of digits. Standard loopholes are forbidden.

Since this is a code-golf, the shortest code in bytes wins!
Examples
It's (quite) possible to have different outputs on these inputs as long as inputs and outputs are different and similar.
1 - 0
3 - 9
9 - 1
19 - 23
191 - 121
1111 - 2222 (0 is not considered valid)
2020 - 9393
2842 - 1321
97892 - 31230
113582 - 113452
444615491 - 666807690
87654321000 - 98765432111
98765432111 - 87654321000
526704219279 - 536714329379
99887766553210 - 88776655443210

Sample inputs as a list:
1,3,9,19,191,1111,2020,2842,97892,113582,444615491,87654321000,98765432111,526704219279,99887766553210

Looks like you posted the challenge only 4 hours after you posted it to the sandbox. It's way too short to get a meaningful feedback. It is recommended to keep it in the sandbox for at least 3 days.

Sorry, I'll keep that in mind next time. Thanks. @Bubbler

Related: Imitate an ordering

The sample is updated, python tester for sample, check if you're not sure of definition

I'm a bit confused about the second condition (the comparison results) when at leas one of m or n is 1.

Doesn't really matter for single-digit numbers. They're all similar. @mappo

Does this definition not mean that a number is similar to itself?

Yes, but it's explicitly stated that you should output a different similar number. @retnikt

What about an input like 123456789? I believe there is no number that is both similar to and different from it, so what should we output?

you're apparently not the first one asking this. You can assume at least one such integer exists. @Seb

Python 3, 58 52 bytes
lambda n:[9-(9in n)-sum(x>d for x in{*n})for d in n]

Try it online!
Input: The number n, as a list of digits.
Output: A similar number, as a list of digits.
-6 bytes thanks to @xnor!
How:
Reverses the list of unique digits, then maps them to 9,8,7,... or 8,7,6,... depending on whether n contains the digit 9 or not.
For example:
               | n = 1827 | n = 7899
Reverse unique |   8721   |   987
Maps to        |   9876   |   876
Results        | m = 6978 | m = 6788

Old solution
Python 3, 80 bytes
f=lambda n,i=9:(i in n)^(i-1in n)and[[d,d^i^~-i][i-2<d<=i]for d in n]or f(n,i-1)

Try it online!
Input: The number n, as a list of digits.
Output: A similar number, as a list of digits.
-1 byte thanks to @KevinCruijssen!
How
The solution tries to find a pair of consecutive digits \$(i-1,i)\$ such that one digit appears in \$n\$, and the other doesn't. It then replaces all occurrences of one digit with the other.
The pair of digits are searched from \$(8,9)\$ downward, in order to discourage replacing 1 with 0.

I like your 50-byter, but I'm afraid it's incorrect for n=9 and n=98765432111. You're supposed to find a different number.

Fixed, but at the cost of 9 bytes. Thanks for pointing this out!

@SurculoseSputum I also wrote out a pretty similar solution before finding it didn't work on those test cases.

@SurculoseSputum Glad you managed to fix it. And your approach inspired a -6 golf on my own answer. :)

Shorter sorted indexing: TIO. Also more testing.

Nice! I am afraid it fails for 50213456789.

@Master_ex I don't think 50213456789 is a valid input, since there is no other number similar to it.

@SurculoseSputum Maybe I am missing something. Isn't in that case 40213456789 for example similar?

The 1st and 6th leftmost digits (1-indexed) are 54 vs 44, which doesn't satisfy the requirement (4<5 iff 4<4).

@SurculoseSputum Thank you, I missed this part.

JavaScript (ES6), 55 bytes
I/O format: list of digits.
a=>a.map(d=>d-=-!/9/.test(a)|!a.includes(d-=d>(a<'2')))

Try it online!
Commented
a =>                // a[] = input array of digits
  a.map(d =>        // for each digit d in a[]:
    d -=            //   update d:
      -!/9/.test(a) //     if a[] doesn't include any 9, increment d
      |             //     (this does d = d - (-1 | whatever) = d - (-1) = d + 1)
                    //     otherwise, decrement d if:
      !a.includes(  //     - a[] does not include d - 1
        d -= d >    //     - and d is greater than 0 if the leading digit is not 1,
          (a < '2') //       or greater than 1 otherwise (so that it doesn't result
      )             //       in a leading zero)
  )                 // end of map()

I guess your code is not working on input 191?

@newbie Thanks for reporting this. Now fixed. I think 191 should be added to the test cases.

Good idea, added. Updated sample tester too. @Arnauld

05AB1E, 20 16 10 bytes
êRāTα:DIQ-

-6 bytes after being inspired by @SurculoseSputum partially incorrect approach.
I/O as a list of digits.
Try it online or verify all test cases.
Explanation:
ê          # Sort and uniquify the digits in the (implicit) input-list
           #  i.e. [2,8,4,2] → [2,4,8]
 R         # And reverse it
           #  → [8,4,2]
  ā        # Push a list in the range [1, length] (without popping)
           #  → [1,2,3]
   Tα      # Take the absolute difference with 10
           #  → [9,8,7]
     :     # Replace in the (implicit) input-list the sorted unique digits with [9,8,...]
           #  → [7,9,8,7]
      D    # Duplicate it
       IQ  # Check whether it's equal to the input-list (1 if truthy; 0 if falsey)
           #  → 0 (falsey)
         - # Subtract that from each digit
           #  → [7,9,8,7]
           # (after which the resulting list is output implicitly)

Original 20 16 bytes approach:
∞IK.Δ‚εSæ2ùÆ.±}Ë

-4 bytes thanks to @petStorm.
I/O as regular integers.
Try it online or verify the smaller test cases (larger ones time out).
Explanation:
∞              # Push an infinite list of positive integers: [1,2,3,...]
 IK            # Remove the input-integer itself from the list
.Δ             # Then find the first value in this list which is truthy for:
  ‚            #  Pair the current value with the (implicit) input-integer
               #   i.e. input=2842 and y=1321 → [2842,1321]
   ε           #  Map both to:
    S          #   Convert them to a list of digits
               #    → [[2,8,4,2],[1,3,2,1]]
     æ         #   Take the powerset of this list of digits
      2ù       #   Only leave the pairs
               #    → [[[2,8],[2,4],[2,2],[8,4],[8,2],[4,2]],
               #       [[1,3],[1,2],[1,1],[3,2],[3,1],[2,1]]]
        Æ      #   Reduce each inner pair by subtracting
               #    → [[-6,-2,0,4,6,2],
               #       [-2,-1,0,1,2,1]]
         .±    #   Take the signum of each (-1 if a<0; 0 if a==0; 1 if a>0)
               #    → [[-1,-1,0,1,1,1],
               #       [-1,-1,0,1,1,1]]
           }Ë  #  After the inner map: check if the pair of lists are the same
               #   → 1 (truthy)
               # (after we've found our value, it is output implicitly as result)

I got an incomplete idea over here. If you can complete it it'd be great.

@petStorm Ah, nice approach with the powerset. :) Here is a possible way to fix it for 17 bytes: ∞IK.Δ‚εæ2ùε`.S}}Ë (test suite).

@petStorm 16 bytes actually: ∞IK.Δ‚εSæ2ùÆ.±}Ë (test suite).

To make it clear: I won't accept answers not passing the samples in decent time. But still, well done :)

@newbie Golfed 6 bytes while making it faster at the same time. ;) Still have to check if it 100% covers all possible test cases though. If you can think of any test case where this might fail for, let me know.

Hmm... 987654320? @KevinCruijssen

@newbie Yeah, just saw that myself and was actually updating my answer. Fixed ;)

K (oK), 27 bytes
{((9-9=|/x)-!#?x)(?x@>x)?x}

Try it online!
Takes the input as a list ot digits.
Inspired by Kevin Cruijssen's 05AB1E and Surculose Sputum's Python solutions - please don't forget to upvote them!

Nice Galen.  What resources have you been using for learning K?

@Jonah Mostly oK. Also you can always chat in th k-tree room

Charcoal, 24 19 bytes
⭆θ⁻⁺⁸¬№θ9ＬΦγ∧›λι№θλ

Try it online! Link is to verbose version of code. Now based on @SurculoseSputum's newer answer. Explanation:
 θ                  Input as a string
⭆                   Map over characters and join
       θ            Input as a string
      № 9           Count `9`s
     ¬              Logical Not (i.e. does not contain `9`)
   ⁺⁸               Add `8`
          Φγ        Filter on printable ASCII
              λ     ASCII character
             ›      Greater than
               ι    Input character
            ∧       Logical And
                  λ ASCII character
                №θ  Occurs in input
         Ｌ          Length of matches
  ⁻                 Subtract from the `8` or `9`
                    Implicitly print

Previous 24-byte version based on @SurculoseSputum's older answer:
≔⌈Φχ¬№θＩιη⪫⪪θ⎇⁼η⁹⌈θＩ⊕ηＩη

Try it online! Link is to verbose version of code. Explanation:
≔⌈Φχ¬№θＩιη

Find the highest digit not present in the input number.
⎇⁼η⁹⌈θＩ⊕η

If that digit is less than 9 then increment it (which will give a digit in the input number) otherwise take the highest digit of the input number.
⪫⪪θ...Ｉη

Replace the digit from the input number with the digit not in the input number.

W, 14 bytes
Port of the 10-byte 05AB1E answer.
♥f<~|J▄5sO#o═╥

Uncompressed:
 oFU_:kkT-zrZ:a=-

Erlang (escript), 143 bytes
Port of Surculose Sputum's Python answer.
u([])->[];u([H|T])->[H]++u([A||A<-T,A/=H]).
i(X)->case X of true->1;_->0end.
f(A)->[9-i(lists:member(9,A))-lists:sum([i(X>D)||X<-u(A)])||D<-A].

Try it online!

Wolfram Language (Mathematica), 79 bytes
Port of @SurculoseSputum answer
#/.MapThread[Rule,{a=Union@#,Range[0,9][[-Tr[1^a]-(d=Boole[Max@a>8]);;-1-d]]}]&

Try it online!

J, 29 24 16 bytes
9-9&e.+\:~@~.i.]

Try it online!
-8 thanks to FrownyFrog!
Thanks to Bubbler for catching some bugs.  All are now fixed.
Inspired by Surculose's sweet answer, be sure to upvote him.

Nice! 0<<./ -> 0&e. for 22 bytes ?

Sorry for not checking it. I'm glad you fixed it!

9-9&e.+\:~@~.i.]

Impressive!  Thanks for finding this.  Something about it was bugging me.  Now I know why.

Bash + Unix utilities, 77 74 bytes
tee t|tr "`rs -T|sort -ur|xargs`" "`grep -q 9 t;seq $[8+$?] -1 0|xargs`"<t

Try the test suite online!
Input is a list of integers on stdin (space-separated digits).
Output is in the same format, on stdout.
This is an implementation of Surculose Sputum's nice method: List the unique digits that appear in the input, sort them in decreasing order, and then replace them in the original input either with \$8, 7, 6, \dots\$ (if \$9\$ appears in the input) or with \$9, 8, 7, \dots\$ (if \$9\$ does not appear in the input).

This is a port of @Surculose Sputum's solution in APL2.
U←((A⍳A)=⍳⍴A)/A←,A
((9∊A)⌽⌽⍳10)[U[⍒U]⍳A]

It presupposes that A is a vector of numbers and that ⎕IO=0

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


text:
Find two contiguous subarrays with the greatest difference
Here's an interview question I've seen on a few sites. People claim that an O(n) solution is possible, but I've been racking my brain these last 2 days and I couldn't come up with a solution, nor find one anywhere on the web.
Given an array of integers, find two disjoint, contiguous subarrays such that the absolute difference between the sum of the items in each subarray is as big as possible.
Example input: (2, -1, -2, 1, -4, 2, 8)
Example output: ((1, 4), (5, 6))
The output above is the indices of these two subarrays: ((-1, -2, 1, -4,), (2, 8))
I've been trying to reduce this problem to the Maximum subarray problem but with no success.

This is off-topic for codegolf.stackexchange.com . To obtain the maximum/minimum subarray problem from this, you can compute the maximum/minimum subarray on all prefixes and all suffixes, and iterate over a "separator" index such that the maximum subarray and the minimum subarray lie to different sides of it. (that is, if you created arrays lmax, lmin, rmax, rmin, for i from 0 to n-1 ans = max(ans, rmax[i]-lmin[i], lmax[i]-rmin[i]))

I think the array with the bigger sum should be the maximum subarray, and the one with the smaller sum should be the reverse of that maybe (minimum subarray?). I think (this is pure intuition, I don't have an idea whether it's correct) you can run Kadane's on the array, negate all the elements, and run Kadane's again to find the maximum difference. With a few tweaks you should also be able to find the indices. And I feel this problem is not suited for codegolf.stackexchange.com

Got a recommendation for a more fitting StackExchange site to ask this?

Personally I would guess Computer Science, since you don't have a solution yet. Though be sure to read their help centre. Good luck!

Probably Stack Overflow or Computer Science. Code Review might work if used correctly, but they'll probably simply micro-deoptimize your code to half the performance and tell you you aren't naming your variables right. For extremely extreme cases, CS Theory or Math Overflow might also work.

@mypronounismonicareinstate Code Review can only be used for existing and already working code, which I think is missing here.

@mypronounismonicareinstate Please don't give answers or provide help for off topic questions.  We should not be encouraging people to ask their questions here.  If you really need to share just wait until it gets migrated and provide help there.

@AdHocGarfHunter do you think this person did not understand that this is off-topic? If you look at their network profile, you can easily notice that they probably have an idea about what is Stack Exchange.

@mypronounismonicareinstate I don't think that really matters.


text:
Is it a brainfuck instruction?
A very simple challenge today. Output a truthy value whether the ASCII character (or it's code) supplied is a brainfuck instruction (one of +-,.<>[]), and a falsy value if it's a comment (everything else).
Input
+
#
<
>
.
P
,

Output
true
false
true
true
true
false
true

As in, can the answer be formatted as either a program or function? (such as requiring main(){} and all of that in C answers)

@RedwolfPrograms doesn't matterdoesn't matter

Is the input character guaranteed to be printable ASCII? (32-126)

No, but I'd like to see (a part of an already valid answer) that assumes it's printable as an "addon". As I've stated (or rather deleted the comment afterwards), as it's quite a boring challenge, I'm looking for some creativity

Shouldn't the language name be capitalized?

@LuisMendo No, according to the esolang wiki, it's often lowercase

+8/-6, now that's a controversy :p

+10/-7 is this challenge that bad?

brainfuck, 105 103 95 bytes
Outputs \x00 for false and \x01 for true.
,>>>+++++++[<++++++<++++>>-]<+[<<->>-]<<[-[-[-[--------------[--[>+[<->-]<[--[<->[-]]]]]]]]]<+.

Try it online!
The general principle is comparing against all values (decreasing partial distances of the char-codes), using loops to logically OR the results, and if none matched - change the output cell from 1 to 0.
See my 4 answer for a more detailed explanation (4 instructions read more easily).

unsure, 1302 bytes
um um yeah err hm yeah uhhhhhhhh then ummmm uhhh errrr uhh errr ummmmm yeah err uh then heh then err um heh but um um yeah err heh no oops then but oops heh oops oops oops oops oops oops oops oops um then heh then uhhhhhhhhh no oops oops then um err uh then heh then err um heh but um um yeah err heh no oops then but oops heh oops oops oops oops oops oops oops um then heh then uhhhhhhhh no oops oops then um err uh then heh then err um heh but um um yeah err heh no oops then but oops heh oops oops oops oops oops oops um then heh then uhhhhhhh no oops oops then um err uh then heh then err um heh but um um yeah err heh no oops then but oops heh oops oops oops oops oops um then heh then uhhhhhh no oops oops then ummmmmmm uh errr uh then heh then err um heh but um um yeah err heh no oops then but oops heh oops oops oops oops um then heh then uhhhhh no oops oops then umm err uh then heh then err um heh but um um yeah err heh no oops then but oops heh oops oops oops um then heh then uhhhh no oops oops then ummmmmm uhhh ummmmm errrrrr uh then heh then err um heh but um um yeah err heh no oops then but oops heh oops oops um then heh then uhhh no oops oops then umm err uh then heh then err um heh but um um yeah err heh no oops then but oops heh oops um then heh then uhh no oops oops oops okay

This was not easy. Unsure is a new stack based language I've created, that uses words people tend to say when they're not sure about something.
It's kind of hard to explain how such a large program works, but I'll try to give a high-level explanation. First, here's an expanded version of this program:
um um yeah err hm yeah uhhhhhhhh then ummmm uhhh errrr uhh errr ummmmm yeah err uh

then heh then err um heh
but um um yeah err heh no oops then
but oops heh oops oops oops oops oops oops oops oops um then heh then uhhhhhhhhh no oops oops then um err uh

then heh then err um heh
but um um yeah err heh no oops then
but oops heh oops oops oops oops oops oops oops um then heh then uhhhhhhhh no oops oops then um err uh

then heh then err um heh
but um um yeah err heh no oops then
but oops heh oops oops oops oops oops oops um then heh then uhhhhhhh no oops oops then um err uh

then heh then err um heh
but um um yeah err heh no oops then
but oops heh oops oops oops oops oops um then heh then uhhhhhh no oops oops then ummmmmmm uh errr uh

then heh then err um heh
but um um yeah err heh no oops then
but oops heh oops oops oops oops um then heh then uhhhhh no oops oops then umm err uh

then heh then err um heh
but um um yeah err heh no oops then
but oops heh oops oops oops um then heh then uhhhh no oops oops then ummmmmm uhhh ummmmm errrrrr uh

then heh then err um heh
but um um yeah err heh no oops then
but oops heh oops oops um then heh then uhhh no oops oops then umm err uh

then heh then err um heh
but um um yeah err heh no oops then
but oops heh oops um then heh then uhh no oops oops

oops okay

The first part sets up the stacks. There are two stacks, one of which is selected as the active stack. The first stack contains a 0 at the bottom (the return value), as well as 8 copies of the input character's ASCII character code, negated.
After this, there are 8 sections to check for equality (first one shown as an example):
then heh then err um heh
but um um yeah err heh no oops then
but oops heh oops oops oops oops oops oops oops oops um then heh then uhhhhhhhhh no oops oops then um err uh

The first line will pop the first stack and add it to the first, which in this case is 43 (the character code for +). It also pushes 1 to the first stack. The next line is essentially an if statement, which is used to create a NOT operator by pushing 0 to the first stack if the result of adding the character code is not 0 (meaning they are not the same).
The third line is the most complicated. It starts with a sort of else statement, as it only runs when the second line's if statement doesn't push 0 (and therefore the character code was 43). It will then replace the bottom of the first stack with 1, the new output.
Finally, after the "else statement", the character code is incremented to 44, for ,, and the process is repeated 7 times.
The last line, oops okay, just outputs the bottom item in the first stack, as the previous operations have cleared it out except for one copy of the input (oops discards the top of the stack, and okay outputs).
There's definitely a few bytes I could golf here and there, might work on it later.

um err uh okay uh well then um uh yeah um sure

Why is like not in there?

@EnderShadow8 Not sure how to answer (luckily this language gives me lots of options to express that :p)

Retina 0.8.2, 9 bytes
[]+-.<>[]

Try it online! Link includes test cases. Explanation: This is actually a character class; the outer []s delimit the class, as (by being placed immediately after the opening [) the first ] is actually part of the class. The , isn't needed as the - creates a range from + to . which helpfully includes the - itself as well as the ,.

I am now worried that the stuff that parses regular expressions is actually a backtracking regex engine...

Python, 16 bytes
'+-,.<>[]'.count

Try it online!
An anonymous method is shorter here than a lambda. See my tip Object method as answer.

<built-in method count of str object at 0x101520730>?

The str object "at 0x101520730" is the string literal in the program. It has a built-in method named count. This method will return 1 only if given an instruction character. You can call it in the normal way by providing an immediate parameter e.g. ('.') or you can assign it to a variable (e.g. f) and call f later.

@VictorVosMottorthanksMonica Note also that the usual submissions of lamdba's are represented as a similarly weird value like <function <lambda> at 0x7fd4f39d7758>.

Anything that doesn't have a __str__ or a __repr__ has that.

vJASS (Warcraft 3), 299 278 265 bytes
Using //! import zinc "<code_path>" command to exclude //! zinc and //! endzinc.

Prints T (True) and F (False).
library Q{trigger W=CreateTrigger();integer E;function onInit(){TriggerRegisterPlayerChatEvent(W,Player(0),"",false);TriggerAddAction(W,function(){for(0<=E<8){if(GetEventPlayerChatString()==SubString("+-<>.,[]",E,E+1)){BJDebugMsg("T");return;}}BJDebugMsg("F");});}}

Readable Version:
library CodeGolf{
    trigger chatEvent = CreateTrigger();
    integer Index;

    function onInit(){
        TriggerRegisterPlayerChatEvent(chatEvent, Player(0), "", false);
        TriggerAddAction(chatEvent, function(){
            for (0 <= Index < 8){
                if(GetEventPlayerChatString() == SubString("+-<>.,[]", Index, Index + 1)) {
                    BJDebugMsg("T");
                    return;
                }
            }
            BJDebugMsg("F");
        });
    }
}

Output:

05AB1E, 11 bytes
+1 due to a bug fix noted by @Kevin Cruijssen
-1 thanks to @Kevin Cruijssen
"+-,.<["ºIå

Try it online!
an interesting approach, but sadly it's longer and it doesn't work:
•q”;ιÚ•2ôIÇ;îå

Try it online!

Your 11-byter should be "+-,.<>[]"Iå or "+-,.<>[]"så. You want to check if the input is in that string, not if that string is in the input. And you can save a byte by using the mirror builtin: "+-,.<["ºIå

Haskell, 18 bytes
(`elem`"+-.,<>[]")

Try it online!
Low-effort unnamed function.

For convenience with pointfree TIO submissions, you can add the -cpp flag and use backslash to continue a line like this: Try it online!

@xnor ah I tried to do that without the flag, ty

Python 3, 26, 23 bytes
lambda s:s in'+-,.<>[]'

Try it online!

Is this really a valid format?

@dingledooper , I might have gotten mixed up. I'm pretty new, still don't know all the valid formats. The only reason I changed this from my old answer was because I saw xnor's answer, which I thought was invalid, but, hey - he's way more experienced than me, so I probably just didn't know something. Am changing back to my old one.

For your information, xnor's answer is still a function, in that it can be called with a parameter. Your previous answer was not, it was just a snippet since in is a keyword that doesn't make a function

@Dion See also my tip Object method as answer.

This isn't a valid answer; it's an expression, not a function.

4, 131 bytes
Outputs \x00 for false, \x01 for true.
3.799600006010160202614146292964343199994389919999018991999901899199990189919999148991999902899199992989919999028995004999999995014

Try it online!
Explanation
4 doesn't have a simple comparison or condition instructions, so I used while-not-zero loops to fake them and match by distances:
3.

6 00 00            # set constants
6 01 01
6 02 02
6 14 14
6 29 29
6 43 43

7 99               # input as integer

1 99 99 43 - 8 99  # for each brainfuck character
1 99 99 01 - 8 99  # compare to the input,
1 99 99 01 - 8 99  #  (subtracting differences to the input)
1 99 99 01 - 8 99  #  and jump to the end if true,
1 99 99 14 - 8 99  #  otherwise start a loop (to fake branching)
1 99 99 02 - 8 99
1 99 99 29 - 8 99
1 99 99 02 - 8 99
5 00 4             # if all comparisons failed, print 'false' and exit
9 9 9 9 9 9 9 9    # close loops

5 01 4             # print 'true' and exit

C (gcc), 28 bytes
f(c){c=index("+-,.<>[]",c);}

No math here, no math there, no math anywhere.
Try it online!

Pyke, 3 bytes
Built-ins FTW!
~B{

Try it online!
Explanation
~B  "><+-.,[]"
  { Does it contain input?

Fig, \$10\log_{256}(96)\approx\$ 8.231 bytes
Ix"[]-=.,"

Try it online!
An answer so the bot can get 30 rep to chat. Never mind, realized I had enough on SF&F, but deleting this would be useless, so here ya go.

6502 assembly, 17 bytes
0000: 69 05 29 FD A2 04 D5 0C
0008: F0 03 CA D0 F9 60 30 31
0010: 41

This subroutine should be called with A set to the input, and the carry flag cleared. It will return with the Z flag indicating whether the input was a Brainfuck instruction.
Here the subroutine is at $0000 but it can go anywhere on the zero page. The asterisk in cmp *r-1,x forces a 2-byte zero-page-based comparison (in this web assembler, at least).
.org $0000
f:
  adc #5
  and #$fd
  ldx #4
loop:
  cmp *r-1,x
  beq r
  dex
  bne loop
r:
  rts  ; which is #$60
.byte $30, $31, $41

How it works
The valid Brainfuck instructions are {2b, 2c, 2d, 2e, 3c, 3e, 5b, 5d} in hexadecimal. Adding 5 to the ASCII values groups them into pairs like "n or n+2" where the second-lowest bit doesn't matter:

Instruction
ord+5
Bit pattern

+ or -
$30 or $32
0011 00x0

, or .
$31 or $33
0011 00x1

< or >
$41 or $43
0100 00x1

[ or ]
$60 or $62
0110 00x0

This means we can check if (n+5)&~2 ∈ {$30, $31, $41, $60}.
Actually a lot of choices other than 5 work. But this one puts $60 in the set of values to look for, which is the opcode for the RTS instruction. Thus we can interleave the table with the final instruction and save one byte.

Keg, -rt, 10 bytes
-`[]+-,.<>

This:

Pushes the string []+-,.<> onto the stack
Subtracts that string from the input.

If it is a BF instruction, an empty string will be printed, otherwise, the input character will be printed.

Python 3, 26 bytes
print(input()in"+-,.<>[]")

You need something to output the result, usually print. See the Python I/O summary.

I'm pretty sure you can use exit instead of print.

Desmos, 43 bytes
1\left\{42<i<47,i=60,i=62,i=91,i=93\right\}

Try it online
Desmos doesn't support strings, so this turns from relatively trivial string comparison to relatively trivial integer comparison. I tried to compress the higher numbers, but I couldn't find a nice way to exclude 61 and 92, and the sequence doesn't show up in OEIS.

Where exactly can we test desmos answers at? Please do provide a link in later submissions.

@Razetime You can test Desmos answers at the link provided at Desmos (note: I accidentally put the wrong one for this question, fixing that as well). I didn't bother to generate a specific link for this answer as it's trivial, but I probably should have. Adding it now.

Thunno 2, 4 bytes
kŻ$Ƈ

11 bytes:
"[]<>-+.,"$Ƈ

14 bytes:
»ÐṘWĠœṪɲ»ɦBCsƇ

16 bytes:
C¿€ỵæ-j2oẹ&⁵ẏ¿sƇ

Due to a bug with the Ƈ command (which will be fixed in 2.2.0), the s is needed in the last two answers. They will both be one byte less in 2.2.0.
Explanations
kŻ$Ƈ  # Implicit input
  $   # The input...
   Ƈ  # ...is in...
kŻ    # ...the string "[]<>-+.,"
      # Implicit output

"[]<>-+.,"$Ƈ  # Implicit input
          $   # The input...
           Ƈ  # ...is in...
"[]<>-+.,"    # ...the string "[]<>-+.,"
              # Implicit output

»ÐṘWĠœṪɲ»ɦBCsƇ  # Implicit input
»ÐṘWĠœṪɲ»       # Compressed integer 4344454660629193...
         ɦB     # ...converted to base 100 as a list...
           C    # ...and converted to ordinals...
            sƇ  # ...contains the input
                # Implicit output

C¿€ỵæ-j2oẹ&⁵ẏ¿sƇ  # Implicit input
C                 # The ordinal of the input...
              sƇ  # ...is in...
 ¿€ỵæ-j2oẹ&⁵ẏ¿    # ...the compressed list [43, 44, 45, 46, 60, 62, 91, 93]
                  # Implicit output

Screenshots

... why is kŻ a built-in?!

@Shaggy Vyxal has kT for the same thing as well. I didn't know what else to add as a constant, and I had one space left, so I added it :p

Japt -¡, 63 bits / 7.875 bytes
o"+,-.<>[]

Try it
(Because, apparently, we're scoring in bits now? ♂)

Vyxal can be scored in bits because it has a compression algorithm that generates a string of bits. It's exclusive to Vyxal, and not language agnostic at all.

6502 Machine-Language, 32 bytes
0000: AD 1E 00 A2 00 DD 15 00
0008: D0 04 EE 1F 00 00 E8 EC
0010: 1D 00 D0 F1 00 3C 3E 2B
0018: 2D 2E 2C 5B 5D 08 50 00

The above "ROM" includes the variables and the program.
Here's a basic breakdown:
0000: AD 1D 00 A2 00 DD 14 00    Program
0008: D0 04 EE 1E 00 00 E8 EC
0010: 1C 00 D0 F1 00
                     3C 3E 2B    Brainfuck instructions
0018: 2D 2E 2C 5B 5D 08          ("<>+-.,[]" and an 8 for the length)
                        50 00    Input char and output byte

You can try it out using This online emulator
by copying the above ROM into the "RAM" field and setting the input byte (0x001D)
to the desired character in hexadecimal. Then you can load it into memory by pressing "Load Memory", then press "Show Memory" to confirm it loaded and
check the box "live update" so it will show the result once it's done.
Finally, you can press "Continuous Run" and it will write the result to the last
byte of the ROM (0x001E). 0x01 for true and 0x00 for false.
Assembly Code:
.ORG $0000

; PROGRAM

  LDA INPUT
  LDX #0
loop:
  CMP CHARS,X
  BNE end
  INC OUTPUT
  BRK
end:
  INX
  CPX CHARSLEN
  BNE loop
  BRK

; DATA

CHARS:
  .ASCII "<>+-.,[]"
CHARSLEN:
  .BYTE 8
INPUT:
  .ASCII "P"
OUTPUT:
  .BYTE 0

To summarise, it basically reads the input character into the accumulator
and then loops over the list of Brainfuck instructions using the X register
and if Acc matches any of the chars it increments the output byte and exits.
It's probably not very good and could also probably be smaller, but I'm not very experienced with 6502 assembly and just wanted to give it a go.
Feedback welcome :)
(I also haven't tested it very thoroughly so it might also not work in some cases)

JavaScript (Node.js), 25 23 bytes
-2 thanks to @Arnauld
c=>/[+-.<>[\]]/.test(c)

Try it online!

23 bytes

@Arnauld Forgot about .test, thanks!

You can just use /[+-.<>[\]]/.test - point-free

@pxeger Doesn't work. Try f=/[+-.<>[\]]/.test then f("[")

@RedwolfPrograms wow I should never under-estimate the stupidity of JavaScript

SNOBOL4 (CSNOBOL4), 45 bytes
 "<>[]+-,." INPUT :F(F)
 X =1
F OUTPUT =X
END

Try it online!
1 for truthy, empty line for falsey.

Pyth, 10 bytes
/"+-,.<>[]

Try it online!

Kotlin, 18 bytes
{it in "+-<>[].,"}

Try it online!

Scala 2.12, 15 bytes
"<>+-.,[]"toSet

This takes the string of all brainf*** instructions and turns it into a set. Since Scala's sets are also predicates, we can treat it like a function that returns true when it's a valid instruction.
Scala 2.12 is required for postfix operator toSet.
Try it online

Arn, 9 bytes
[‚‚◄┴´£Q7

Try it!
Explained
Unpacked: "+-.,<>[]"&
  "+-.,<>[]" Literal string
& Contains element
  _ Variable initialized to STDIN; implied

Jelly, 10 bytes
ẇ“+-<>[],.

Try it online!
How it works
ẇ“+-<>[],. - Main link. Takes a character C on the left
 “+-<>[],. - Yield "+-<>[],."
ẇ          - Is C in that string?

Red, 27 bytes
""= exclude input"+-,.<>[]"

Welcome to the site, and nice first answer! Would you mind editing in a link to an online interpreter such as TryitOnline, so that other's can test and verify your code?

Vyxal r, 11 bytes
`[]+-.<>,`c

Try it Online!
More interestingly,
Vyxal r, 13 bytes
C₁»½¤Ǎ⋏⟨꘍ċ»τc

Try it Online!
C             # Get charcode
 ₁»½¤Ǎ⋏⟨꘍ċ»τ  # Base-100 list of valid charcodes
            c # Is included?

kTc

Julia 1.0, 14 bytes
in("+-,.<>[]")

Try it online!
some Julia functions will return an anonymous function when fed with not enough arguments, basically in(x) = y -> in(y,x). It would be a bit more interesting with ∈ but it costs 1 more byte.

Pxem (pxem.mktemp.emb.posixism, BREAK_LOOP_WHEN_INSUFFICIENT=1), filename only: 33 bytes.
The \0001 is an unprintable whose codepoint is 0x01.
[<>+-,.].i.t@.w.m.-\0001.yT.o.d.a.c.a

Try it online!
Accepts one character from stdin as an input. Outputs a T for truthy, nothing for falsey.

Pxem (pxem.mktemp.emb.posixism, BREAK_LOOP_WHEN_INSUFFICIENT=0), filename only: 42 bytes.
The \0001 is an unprintable whose codepoint is 0x01.
[<>+-,.].i.t@.w.c.c.z.d.a.m.-\0001.yT.o.d.a@.a

Try it online!
Accepts one character from stdin as an input. Outputs a T for truthy, nothing for falsey.

Factor, 17 bytes
[ "+-,.<>[]"in? ]

Try it online!

Ly, 14 bytes
"+-,.()[]"i~u>

Try it online!
"+-,.()[]"      - Push legit characters onto the stack
          i     - Read codepoint from STDIN
           ~    - Pop stack, search stack for that codepoint, push 1|0 result
            u   - Print top of stack as a number (will be 1 or 0)
             >  - Switch stacks to avoid printing the current contents

jq, 18 bytes
inside("+-,.<>[]")

Try it online!

Fix+4 thanks to @JoKing

Bounty started. By the way, this is 100 because SE has silly rules saying that if you've posted  an answer, the minimum bounty is +100.

The output is always true for every input.

You should be using inside

I'll award the bounty once this answer  becomes valid.

@emanresuA fixed thx to jo king, if you have already lost 100 rep for prev. Bounty you are free to not award the bounty again

@wasif I've decided to just go with only awarding on questions where I can do +50 bounties (No bounties from me, no answers from me), so if you do another answer where I can award one, I happily will - just edit it into the answer in italics. I've got a bit of a backlog, so I can't start another one for three days.

Scratch, 22 bytes
if <symbol v] contains (input) then
set [output v] to [true]
else
set [output v] to [false]

Try it online!

Lua, 31 bytes
print((...):match'[[%]+-.,><]')

Try it online!
Prints either the inputted character (strings are always truthy) or nil (which is falsy).

C (gcc) XPG4.2/Single UNIX Specification, Version 3, POSIX:2001, 30 bytes
f(c){c=!!index("+-,.<>[]",c);}

Try it online!

nitpick: index() isn't included by the C standard, so shouldn't it be stated?

@FryAmTheEggman Ah, well deciphered! Ok, posted the version of POSIX it's good to go on. Thanks! :-)

This is totally not necessary. C (gcc) works just fine.

APL+WIN 12 bytes
3 bytes saved thanks to  @Avi F. S.
Prompts for character and returns 1 if true 0 if false:
⎕∊'+-,.<>[]'

Try it online! Courtesy of Dyalog Classic

Keeping in form with your answer, you can shave off the first ×, here. Though if you just flip them around, you can do ⎕∊'+-,.<>[]'`, here!

C (gcc), 31 bytes
f(c){c=!!strchr("+-,.<>[]",c);}

Try it online!

Ruby -nl, 16 bytes
Input is STDIN. Prints 0 (Ruby truthy) or nil (falsy).
Annoyingly, it seems like Ruby demands that both [ and ] be escaped in the character class regex.
p~/[+-,.<>\[\]]/

Try it online!

That's apparently because Ruby allows nested character classes.

JS, 26 bytes
c=>'+-,.<>[]'.indexOf(c)+1

x86_16 machine code, 40 bytes
Outputs '0' (false) or '1' (true) on the screen.
bb1f 7cb1 5080 3f00 7409 380f 7409 83c3
01eb f2b0 30eb 02b0 31b4 0ecd 10eb fe2b
2d2c 2e3c 3e5b 5d00

To boot, pad it to 510 bytes with zeros and add 55aa at the end!
This means "uncomment the last two assembly lines and rebuild".
Ungolfed (compilable, compile using nasm -fbin -o is-bf is-bf.asm):
[org 0x7c00]

mov bx, string
mov cl, 'P' ; the character
loop_:
    cmp byte [bx], 0
    je false
    cmp byte [bx], cl
    je true
    add bx, 1
    jmp loop_
false:
    mov al, '0'
    jmp print
true:
    mov al, '1'
print:
    mov ah, 0eh
    int 10h
jmp $ ; hang forever

string: db "+-,.<>[]", 0
; times 510 - ($-$$) db 0
; dw 0xaa55

you don't have to make the assembly snippet bootable, you can aswell write a callable function

I like bootable snippets more because I can boot them in QEMU and see the results :)

this makes your code bigger, though.

LaTeX, 52 bytes
\usepackage{xstring}\def\f#1{\IfSubStr{[]+-.,}#1x{}}

Defined a macro \f that takes one argument and expands to x if the input is a brainfuck instruction and to nothing if not. Assumes there is only one character in the argument.
Explanation
\usepackage{xstring}  % load the xstring package for the IfSubStr macro
\def\f#1{             % define a macro \f that takes 1 argument
  \IfSubStr{[]+-.,}#1 % test if the second argument is a substring of the first
    x                 % if it is a substring expand to x
    {}                % else expand to nothing
}

CJam, 14 12 bytes
-2 bytes by treating as a self-contained program instead of a block.
"+-<>[].,"q#

Try it online!
Returns -1 if not a brainfuck character, anything else if so.

Perl 5 -p, 15 bytes
$_=y/+,.<>[]-//

Try it online!

Java (JDK), 20 bytes
"<[+.,-]>"::contains

Try it online!

ARBLE, 21 bytes
find(c,"[[%]+-.,><]")

Returns 1 for truthy, or nothing for falsey.
Try it online!


text:
How Many Ways To Empty The Glove Box?
Inspired by this glove-themed 538 Riddler Express Puzzle.
Task
You are given a positive integer n, and a list A = [a_1, a_2, ..., a_k] of k distinct positive integers.
Then a restricted composition is an ordered list P = [p_1, p_2, ..., p_m] where each p_i is a (not necessarily distinct) member of A, and p_1 + p_2 + ... + p_m = n.
So, if n = 10, and A = [2,3,4] then an example of a restricted composition would be P = [3,4,3]. Another example would be P = [2,3,3,2]. A third example would be P = [3,3,4]. But there's no restricted composition that starts [3,3,3,...], because 10-(3+3+3) = 1, which is not in A.
We want the total number of different restricted compositions given the inputs, as an integer.
Inputs
A positive integer n and a list A of distinct positive integers. All reasonable input formats allowed.
Output
The number of distinct restricted compositions.
Terms and Conditions
This is code-golf; and thus we seek the shortest submissions in bytes satisfying the constraints. Any use of the usual loopholes voids this contract.
Test Cases
(5, [2, 3, 4]) => 2
(10, [2, 3, 4]) => 17
(15, [3, 5, 7]) => 8

Ah, a variant on the knapsack problem. Related XKCD

Python 2, 50 49 bytes
-1 byte thanks to @Jonathan Allan
f=lambda n,A:n>=0and(n<1)+sum(f(n-x,A)for x in A)

Try it online!

A little bit of a switcharoo can save a byte

JavaScript (ES6),  48  40 bytes
Takes input as (a)(n).
a=>g=n=>n>0?a.map(x=>t+=g(n-x),t=0)|t:!n

Try it online!

J, 24 17 bytes
1#.[=1#.[:>@,{\@#

Try it online!
Recursive version was too verbose in J, so I went brute force.
Take the integers in the right arg as a boxed list and the target number n in the left arg.

{\@# - We create a series of cartesian products of the list with itself, starting with 1 (the list unchanged) and up to n (the list crossed with itself n times).
[:>@, We flatten all of those, open them, and sum them.
[= Check which sums equal n.  This returns a boolean list.
1#. Sum it.

APL (Dyalog), 18 bytes
Accepts n as the right argument and A as the left argument.
{⍵>0:+/⍺∘∇¨⍵-⍺⋄⍵=0}

Try it online!

Jelly,  6  5 bytes
ṗⱮẎ§ċ

Try it online! (Very inefficient.)
How?
Builds all lists of lengths \$1\$ to \$n\$ made from the integers in \$A\$ and then counts how many sum to \$n\$.
ṗⱮẎ§ċ - Link: list of positive integers, A; positive integer, n
 Ɱ    - map across x in (implicit range [1..n]) applying:
ṗ     -   Cartesian power -> all length x lists made from values in A
  Ẏ   - tighten (to a list of lists)
   §  - sum each list
    ċ - count occurrences of (n)

K (ngn/k), 23 bytes
{$[x>0;+/(x-y)o\:y;~x]}

Try it online!
recursive

Io, 57 bytes
Port of the Python answer.
f :=method(n,A,if(n>0,A map(x,f(n-x,A))sum,if(n==0,1,0)))

Try it online!

Husk, 10 8 bytes
#o=¹ΣuṖ*

Try it online!
This is so ridiculously inefficient that it struggles on TIO to even run any of the given test cases: link is to a super-easy test case of n=2, a=[1,2,3] (for which output is 4).
Repeats and concatenates (*) the input list n times, and then generates all possible subsets (uṖ - this is the slow step!).  Then counts the number (#) of subsets for which the total equals n (o=¹Σ).

Wolfram Language (Mathematica), 56 49 46 43 41 bytes
2 bytes golfed thanks to J42161217
n_~f~a_=If[n<1,1+Sign@n,Tr[f[n-#,a]&/@a]]

Try it online!
Initial solution:
Length[Join@@Permutations/@IntegerPartitions[#,∞,#2]]&

Try it online!

nice port! 41 bytes

@J42161217 Thanks! That's a clever use of infix notation btw, I wouldn't have thought of using it for function definition

39 bytes

Charcoal, 21 20 bytes
⊞υ¹Ｆθ⊞υ↨Φυ№η⁻⊕ιλ¹Ｉ⊟υ

Try it online! Link is to verbose version of code. Edit: Saved 1 byte by using base conversion from 1 instead of summing a potentially empty list. Explanation:
⊞υ¹

Start our result list with the number of solutions for n=0 which is always 1 (the empty list).
Ｆθ⊞υ

Loop n times, so that we calculate the results for 1..n, appending them to the result list.
↨Φυ№η⁻⊕ιλ¹

Sum those results so far that contribute to the next total. For example, if A is [2, 3, 4], then to calculate the result for n=10, we already know the results for n=0..9, but we only add the results for n=6, n=7 and n=8. The sum is calculated by converting from base 1 in case the list is empty.
Ｉ⊟υ

Print the result for n.

Ruby, 40 36 bytes
Python answer port but Ruby strict typing means I can't coerce booleans into integers.
-4 bytes from dingledooper.
f=->n,a{n>0?a.sum{|e|f[n-e,a]}:1<<n}

Try it online!

I think you can get around the 'boolean issue' by using 1<<n instead of n==0?1:0.

C (gcc), 89 bytes
Port of the Python answer.
Edit: Outgolfed by Noodle9 :/
int n;f(int x,int*a){if(x<=0)return!x;int y=0,i=0;while(i++<n)y+=f(x-a[i-1],a);return y;}

Try it online!

72 bytes

C (gcc), 65 63 bytes
Saved 2 bytes thanks to my pronoun is monicareinstate!!!
f(n,a,l,s,i)int*a;{for(s=i=!n;i<l&n>0;)s+=f(n-a[i++],a,l);n=s;}

Try it online!

You can remove i++ by moving the ++ to f(n-a[i],...). I do not know the algorithm nor the problem itself, but if I replace s=!n,i=0 with i=s=!n, I get the same answers for the test cases.

@mypronounismonicareinstate Just moved the ++ but thanks for the i init! If !n isn't 0 the for loop isn't going to run and i isn't used.  Nice one :-)

Perl, 52 bytes
$r.=1x$_."|"}{(1x$^I)=~/^($r@){1,$^I}$(?{$\++})(*F)/

Usage
printf "2\n3\n4" | perl -p -i10 glovebox.pl

Explanation
Attempts to turn the problem into a string matching one, then uses regex backtracking to do the hard work! In the example given above it ends up constructing a regex match similar to 1111111111 =~ /^(1{2}|1{3}|1{4}){1,10}$(?{$count++})(*F)/
This will cause the regex engine to attempt each combination of the regex, using (?{$count++}) to increase $count each time the engine matches the input and reaches that point in the pattern, but forcing a fail (*F) before the match returns to cause the engine to backtrack and start again with the next combination. $count ends up being the answer.
Slightly different approach, was hoping it'd end up a bit shorter though...

Haskell, 37 bytes
n!a|n<0=0|n<1=1|n>0=sum$(!a).(n-)<$>a

Try it online!
Quick port of the Python answer, call as n ! a.

05AB1E, 11 7 bytes
L€ãO˜¹¢

-4 bytes thanks to @ovs.
Very slow approach!
Try it online or verify the first two test cases at once (third one times out..).
Explanation:
L        # Push a list in the range [1, first (implicit) input-integer]
 €       # Map over each integer in this list
  ã      #  Take the cartesian product of the second (implicit) input-list that many times
   O     # Sum each inner-most list
    ˜    # Flatten the list of lists
     ¹¢  # And count how many times the first input occurs in this list
         # (after which the result is output implicitly)

05AB1E, 12 bytes
ÅœʒåP}€œ€`Ùg

Here a faster (but now way longer) approach using the Åœ builtin.
Try it online or verify all test cases.
Explanation:
Åœ         # Get all lists of positive integer that sum to the (implicit) input-integer
  ʒ        # Filter this list of lists by:
   å       #  Check for each value whether it's in the second (implicit) input-list
    P      #  And check if this is truthy for all of them
  }€œ      # After the filter: get the permutations of each remaining list
     €`    # Flatten one level down
       Ù   # Uniquify the list of lists
        g  # Pop and push the length for the amount of remaining lists
           # (after which the result is output implicitly)

7 bytes with your first approach: L€ãO˜¹¢

@ovs Oh, that's indeed a lot better. Thanks!

Julia 1.0, 35 bytes
port of this Python answer
f(n,A)=n>=0&&+(n<1,f.(n.-A,[A])...)

Try it online!

R, 59 55 bytes
Edit: -4 bytes thanks to Giuseppe
g=function(t,l,u=t-l)sum(!u,unlist(sapply(u[u>0],g,l)))

Try it online!
Recursively removes each element from the glove box, and calls itself with the new total if there's anything left.

55 bytes?

@Giuseppe - Yes!  Thanks!

Wolfram Language (Mathematica), 54 bytes
Tr[Length/@Permutations/@IntegerPartitions[#,All,#2]]&

Try it online!

Red, 81 80 bytes
f: func[x y][case[x = 0[1]x < 0[0]on[sum collect[foreach a y[keep f x - a y]]]]]

Try it online!
The same recursive approach almost everyone is using, much longer though.

Racket, 74 64 bytes
(λ(x y)(if(< x 1)(+(sgn x)1)(apply +(map(λ(a)(f(- x a)y))y))))

Try it online!

Wolfram Language (Mathematica), 36 bytes
Tr[Multinomial@@@FrobeniusSolve@##]&

Try it online!


text:
Counting shortest paths on a triangular grid
Background
An Eisenstein integer is a complex number of the form \$ z = a + b\omega \$ where \$a, b\$ are integers and \$\omega\$ is the third root of unity \$\frac{1-\sqrt3i}{2}\$. The Eisenstein integers can be viewed as the triangular lattice points, as shown in the image below (from Wikipedia):

Following the triangular grid, one step of movement can be done in six directions:
$$
\begin{array}{r|r}
\text{Direction} & \text{Step} \\ \hline
E  & 1 \\
NE & 1 + \omega \\
NW & \omega \\
W  & -1 \\
SW & -1 - \omega \\
SE & -\omega
\end{array}
$$
Task
Given an Eisenstein integer \$z\$, count all shortest paths from the origin (\$0\$) to the point equivalent to \$z\$ on the triangular grid.
Since \$z = a + b \omega\$ can be represented by two integers \$ a, b \$, you can take the input as two integers \$a, b\$ in any consistent order and structure of your choice.
One way to compute this is (thanks to @xnor):
Take the absolute values of [a, b, a-b], and call it L
Calculate binomial(max(L), any other value in L)

Test cases
 a  b  ans
 0  0    1
 2  0    1
 5  3   10
 4  4    1
 2  3    3
 0  2    1
-2  2    6
-4  0    1
-5 -3   10
-1 -1    1
-3 -5   10
 0 -3    1
 4 -1    5
-4 -9  126
 7 -4  330
 8  1    8
 3 -3   20

Can you point me to an explanation of this?
Take the absolute values of [a, b, a-b], and call it L. Calculate binomial(max(L), any other value in L)

@jonrandy First convince yourself that it's true for points in the first quadrant, using a combinatorial argument.  Then, for points elsewhere in the plane, use the fact that the value for that point is the same as the value for the three other points symmetrically located about the origin.  If $a+b\omega$ is the first point, those other three points are $-a-b\omega, b-a+b\omega,$ and $a-b-b\omega.$

Wolfram Language (Mathematica), 38 bytes
Max[l=Abs@{#,#2,#-#2}]~Binomial~Min@l&

Try it online!

Jelly, 7 bytes
;IAṀc$Ṁ

Try it online!
How?
;IAṀc$Ṁ - Link: list of two integers   e.g. [-4, -9]
 I      - incremental differences           [-5]           (since -9 - -4 = -5)
;       - concatenate                       [-4, -9, -5]
  A     - absolute values                   [4, 9, 5]
     $  - last two links as a monad:
   Ṁ    -   maximum                         9
    c   -   choose (vectorises)             [126, 1, 126]  (9c4=9c5=126 and 9c9=1)
      Ṁ - maximum                           126

Python 3.8, 69 68 bytes
Saved a byte thanks to newbie!!!
lambda a,b:math.comb(*sorted(map(abs,[a,b,a-b]))[2::-2])
import math

Try it online!

-1 byte

@newbie Jump to the end. Nice one - thanks! :-)

APL (Dyalog), 13 12 bytes
1 byte saved thanks to @ngn!
(⌊/!⌈/)∘|,,-

Try it online!

( )(f g h i) -> ( )∘f g h i

@ngn right, thanks!

Pyth, 11 bytes
Seems rather long.
.cF_tSa0+aF

Test suite
Explanation
Uses xnor's description.
.cF_tSa0+aF           Full program. Input: a 2-element list [a,b].
        +aF           Add |a-b| to the list of inputs. Produces [|a-b|,a,b]
      a0              Absolute difference with 0 (i.e. absolute value). Vectorizes.
    tS                Sort the list of absolute values and remove the first element.
.cF_                  Reverse the above and apply nCr to its elements.

C (gcc), 92 82 bytes
g(n,k){k=k<0?n=-n,-k:k;n=n<0?k-n:n;k^=n<k?n^=k^=n:0;n=n---k&&k?g(n,k-1)+g(n,k):1;}

Try it online!
10 bytes shorter thanks to ceilingcat!
This is longer than most of the other entries, but I think it's respectable since C doesn't have a built-in for binomial coefficients.
The code uses the fact that the four Eisenstein integers $$n+k\omega,$$ $$-n-k\omega,$$ $$k-n+k\omega,$$ and $$n-k-k\omega$$ are symmetrically located about the origin. Since the original triangular lattice is symmetrical about the origin, all four of those points will have the same number of paths to the origin.
Because of this, we can replace the input point with a point with non-negative Eisenstein coordinates which has the same number of paths to the origin, and that simplifies the computation.
Here's how it works:

If k < 0, replace n by -n, and k by -k.   So now k is non-negative, but the output will be the same as for the original values of n and k.
If n < 0, replace n by k-n.  Now n is also non-negative, but again the output will be the same.
If k > n, swap n and k, so that n is the larger of the two (or they're equal).
Compute the binomial coefficient \$\binom{n}{k}\$ using the recursive formula for it.

@ceilingcat  Thanks!  I had tried all of those ideas, but didn't set them up right to get a reduction in bytes :( .

Charcoal, 33 bytes
⊞υＮ⊞υ±Ｎ⊞υΣυ≔…⌊↔υ⌈↔υθＩ∨¬θ÷Π⊕θΠ⊕Ｅθκ

Try it online! Link is to verbose version of code. Uses @xnor's formula. Explanation:
⊞υＮ

Input a and push it to the list.
⊞υ±Ｎ

Input b and push -b to the list.
⊞υΣυ

Take the sum of the list, a-b, and push that to the list.
≔…⌊↔υ⌈↔υθ

Take the minimum and maximum of the list and form a range between the two.
Ｉ∨¬θ

If the range is empty then just output 1 (unfortunately in Charcoal the product of an empty list isn't 1)...
÷Π⊕θΠ⊕Ｅθκ

... otherwise output the quotient of the products of the ranges min+1..max and 1..max-min.

JavaScript (ES6), 83 bytes
Takes input as (a)(b). Uses @xnor's formula.
with(Math)f=a=>g=(b,k=min(...a=[a,b,a-b].map(abs),n=max(...a)))=>k?n--*g(0,k-1)/k:1

Try it online!

05AB1E, 7 bytes
¥«ÄZscà

Port of @JonathanAllan's Jelly answer, so make sure to upvote him as well!!
Try it online or verify all test cases.
Explanation:
¥        # Get deltas / forward-difference of the (implicit) input-pair
 «       # Merge it to the (implicit) input-pair
  Ä      # Take the absolute value of each
   Z     # Push the maximum of this list (without popping)
    s    # Swap so the list is at the top of the stack again
     c   # Choose; get the binomial coefficient of each value with this maximum
      à  # And pop and push the maximum of those result
         # (after which it is output implicitly)

Io, 79 bytes
Port of most answers.
method(a,b,list(2,0)map(i,list(a,b,a-b)map(abs)sort at(i))reduce(combinations))

Try it online!


text:
Symmetric difference
Surprised that we don't have a symmetric difference challenge yet.
Given two lists only containing positive integers, return all items among these two lists that aren't contained in both of the lists.
Rules
From the set definition:

A set is a collection of definite distinct items.

So you can assume the items in the input lists are always unique.
You can also take input as a set if your language supports it.

Test cases
Here is a sample program that generates the test cases.
[1,2,3],[2,3,4] -> [1,4]

C++ has a builtin but it doesn't work. I'm going to go ask on Stack Overflow.

Jelly, 2 bytes
œ^

It's a two-byte dyadic atom (i.e. a built-in).
Try it online!

APL (Dyalog Unicode), 3 bytes
∪~∩

Try it online!
How it works
∪~∩  ⍝ Input: two sets as vectors
∪    ⍝ Set union
 ~   ⍝ Set minus
  ∩  ⍝ Set intersection

The rest is just for fun.
APL (Dyalog Unicode), 4 bytes
~∪~⍨

Try it online!
~∪~⍨
~     ⍝ Set difference (a~b)
 ∪    ⍝ Set union
  ~⍨  ⍝ Set difference reversed (b~a)

APL (Dyalog Unicode), 5 bytes
~⍨∪⍨~

Try it online!
This one is palindromic!
How it works
~⍨∪⍨~
~⍨     ⍝ Set difference reversed (b~a)
  ∪⍨   ⍝ Set union reversed
    ~  ⍝ Set difference (a~b)

The only symmetric answer so far.

Python 3, 11 bytes
set.__xor__

Try it online!
For built-in set objects, a^b computes symmetrical set difference. __xor__ is the magic name for that operator, and it is shorter than lambda a,b:a^b.
Also works in Python 2.

J, 8 6 bytes
-2 bytes thanks to Bubbler!
-.,-.~

Try it online!
K (oK), 11 bytes
{(x^y),y^x}

Try it online!

Shouldn't -.,-.~ work in J?

@Bubbler Yes, thanks!

Bash, 22 19 bytes
-3 bytes thanks to @user41805
rs 0 1|sort|uniq -u

Try it online!

rs 0 1 is shorter than tr

Wolfram Language (Mathematica), 35 bytes
Join@##~Complement~Intersection@##&

Try it online!

05AB1E, 5 bytes
«¹²ÃK

Try it online!
How?
«     - merge the two input lists   -> a+b
 ¹    - push 1st input list            a,a+b
  ²   - push 2nd input list            b,a,a+b
   Ã  - intersection                   b&a,a+b
    K - discard                        (a+b)-(b&a)

C (gcc), 98 96 bytes
*d;f(a,b,c)int*a,*b,*c;{for(;*c=*a++;c+=!(*d=-*d))for(d=b;*d&&*d-*c;d++);for(;*c=*b++;c+=*c>0);}

Try it online!
-2 bytes thanks to @ceilingcat
Input is in two 0-terminated arrays a and b, output as a 0-terminated array into preallocated buffer c.

Looks like it would be break-even to use a standard f(int*a,int*b,int*c){ instead of K&R.  The repeated a,*b,*c; part is 8 bytes, same as 2x int*.  No saving but nicer to read :/

Ruby, 16 14 bytes
->a,b{a-b|b-a}

Try it online!

R, 45 39 bytes
function(x,y,`-`=setdiff)union(x-y,y-x)

Try it online!
Thanks to user Kirill L.'s comment.
The original was the following.
function(x,y){s=setdiff;union(s(x,y),s(y,x))}

Try it online!
Straightforward, definition coded in R.
Note: the following function is also 45 bytes. I thought that to define s=setdiff first would save a few bytes but as it turns out the function will need a semi-colon instruction separator and to be between braces. For the same byte count a no-tricks function is more natural.
function(x,y)union(setdiff(x,y),setdiff(y,x))

You can still avoid those braces by aliasing setdiff inside function definition. And in this particular case you can save even more bytes, by aliasing it not as a variable, but as an operator! Try it online!

Red, 25 bytes
func[a b][difference a b]

Try it online!

Sounds like difference (10 bytes) should be a valid solution...?

@Bubbler I don't know - it would be just a word - neither a program nor a function.

@Bubbler Something like this?

Yeah. I think it is valid under CGCC rule because the word itself is reusable (even if you can't easily assign it to a different name).

05AB1E, 6 bytes
«©ʒ®s¢

How does it work?
« merge lists
 © store in the global register
  ʒ keep only items which
   ®s¢ the number of times which they appear in the merged list is truthy, which is only 1 in 05AB1E

Try it online!

Charcoal, 8 bytes
Ｉ⁺⁻θη⁻ηθ

Try it online! Link is to verbose version of code. Explanation:
   θ        First input
    η       Second input
  ⁻         Remove matching elements
      η     Second input
       θ    First input
     ⁻      Remove matching elements
 ⁺          Concatenate
Ｉ           Cast to string
            Implicitly print

JavaScript (ES6), 46 bytes
Takes input as (a)(b), where \$a\$ and \$b\$ are Sets. Returns a list.
JS has very few set built-ins, so this a bit verbose.
a=>b=>[...a,...b].filter(x=>a.has(x)^b.has(x))

Try it online!

MATL, 2 bytes
X~

Try it online!
Explanation
Built-in. Implicit inputs, implicit output.

Julia, 7 bytes
symdiff

Try it online!

05AB1E, 4 bytes
«Ð¢Ï

Try it online.
Explanation:
      #  i.e. inputs: [1,2,3] and [2,3,4]
«     # Merge the two (implicit) input-lists together
      #  STACK: [[2,3,4,1,2,3]]
 Ð    # Triplicate this merged list
      #  STACK: [[2,3,4,1,2,3],[2,3,4,1,2,3],[2,3,4,1,2,3]]
  ¢   # Count all occurrences of the values in the list
      #  STACK: [[2,3,4,1,2,3],[2,2,1,1,2,2]]
   Ï  # Only leave the values at the truthy (count = 1) indices
      #  STACK: [[4,1]]
      # (after which the result is output implicitly)

Haskell, 36 bytes
x%y=filter(`notElem`y)x
x#y=x%y++y%x

Try it online!

Icon, 38 bytes
procedure f(a,b)
return a++b--a**b
end

Try it online!

Groovy, 18 bytes
f={a,b->a-b+(b-a)}

Try it online!

PowerShell, 39 bytes
param($a,$b)$a+$b|group|? c* -eq 1|% n*

Try it online!
unrolled:
param($a,$b)
$a+$b|group|where count -eq 1|% name

Pyth, 5 bytes
-sQ@F

Try it online!
 sQ   sum inputs (union since inputs are sets)
-     minus
   @F intersection of inputs

Perl 5, 42 bytes
sub u{map$k{$_}++,@_;grep$k{$_}==1,keys%k}

Try it online!

Python, 49 bytes (no built-in set operations)
lambda s,t:[a for a in s+t if(a in s)*(a in t)<1]

Attempt This Online!
takes two lists as input, returns symmetric difference of those lists
(concatenation without elements that appear in both lists)
Python, 22 bytes
lambda s,t:(s-t)|(t-s)

lambda s,t:(s|t)-(t&s)

build symmetric difference as union of differences / union without intersection

Factor + sets.extras, 14 bytes
symmetric-diff

Try it online!

No builtin:
Factor + math.unicode, 25 bytes
[ 2dup ∪ -rot ∩ ∖ ]

Try it online!

Pascal, ≥ 4 B
The symmetric difference operator denoted >< is defined by ISO standard 10206 “Extended Pascal” as part of the programming language.
A><B        { where `A` and `B` are assignment-compatible `set` expressions }

In “Standard Pascal”, defined by ISO standard 7185, you will need to resort to basic operators:
(A−B)+(B−A)

RosettaCode │ FreePascal Compiler wiki │ Pascal programming WikiBook

J-uby, 11 bytes
This is a direct port of daniero's Ruby solution; give them an upvote. Mostly I wanted to post it because it looks like a bunch of emoticons.
:|%[:-,~:-]

Attempt This Online!
Explanation
:| % [:-, ~:-]
:| % [  ,    ]  # Union of...
      :-        #   difference (a-b) and
          ~:-   #   reversed-argument difference (b-a)


text:
Produce an image based on an elementary cellular automata ruleset
What is elementary cellular automata?
Since I'm not sure I'll be able to explain this so that somebody who has never heard of this is able to understand, I'm giving an explanation from https://mathworld.wolfram.com/ElementaryCellularAutomaton.html

Elementary cellular automata have two possible values for each cell (0 or 1), and rules that depend only on nearest neighbor values. As a result, the evolution of an elementary cellular automaton can completely be described by a table specifying the state a given cell will have in the next generation based on the value of the cell to its left, the value the cell itself, and the value of the cell to its right. Since there are 2×2×2=2^3=8 possible binary states for the three cells neighboring a given cell, there are a total of 2^8=256 elementary cellular automata, each of which can be indexed with an 8-bit binary number. For example, the table giving the evolution of rule 30 (30=00011110_2) is illustrated above. In this diagram, the possible values of the three neighboring cells are shown in the top row of each panel, and the resulting value the central cell takes in the next generation is shown below in the center.

The evolution of a one-dimensional cellular automaton can be illustrated by starting with the initial state (generation zero) in the first row, the first generation on the second row, and so on. For example, the figure bellow illustrated the first 20 generations of the rule 30 elementary cellular automaton starting with a single black cell.

The task
Given a ruleset n, where n is positive and less than 256, produce an image like the one above, with 15 generations (+1 starting gen-0) and 2 colors of your choice. The starting gen-0 is one active cell in the center, like in the image above. You can choose to start from the bottom and work upwards.
Input
You can take input either as  a:

Binary number (for example, rule 30 would be 00011110 or the reverse 01111000)
Decimal number (rule 30 would be 30)

You cannot take images from external resources, the image should made from scratch by your program.
Output
Your output should be a 31x16 image, with each row representing a separate generation. Generations should not be given in a mixed order.
Submissions
Your submission should always contain the following:

Your code
An image produced by your program, representing a ruleset of your liking.
Standard loopholes apply. Your program should work for any n in the range [0,256).

Scoring is done by byte count
EDIT
As requested, adding some test cases specifically for edge handling.
rule 222:

rule 201:

rule 162:

rule 16:

@newbie there we go, fixed link)

You are asking for a very specific thing with little room for creativity (you even specified the exact dimensions), why popularity-contest? Is this "Do X creatively" with a restriction that you may not be creative at pretty much anything?

yep, changed it

I edited out the "scoring is by votes" since this is tagged code golf.

@xnor, changed it to byte count

@LuisMendo sure

It seems like many current solutions don't handle the edge condition correctly. For example, this Python answer assumes that each row is padded with 0 on both side, which is not true for odd rules. I suggest adding the test case 243, and maybe clarify in the specification how to deal with such edge cases.

Python 2, 178 167 ... 128 bytes
-13 bytes thanks to @Surculose Sputum!
-2 bytes thanks to @dingledooper!
thanks @Surculose Sputum again for saving some bytes and fixing the boundary bug!!!!
n=input()
print'P1 31 16'
c='%061d'%10**30
exec"print' '.join(c[15:46]);c='0'+''.join(n[int(c[u:u+3],2)]for u in range(60));"*16

Try it online!
Output a 31x16 pbm image in stdout. You might need a magnifying glass to see those tinnie images though.

'01111000' =>  (30 in reverse)
  '01011000' =>  (26 in reverse)

Those screenshots appear to be offset by 1 from your (presumably correct) program output.

Yeah, seems the pbm format is a little bit different from the ppm one. @Neil Fixed, thanks.

Could be wrong, but IIRC you don't need the dimensions for P1

I'm not sure, but the image viewer in my computer refuses to work without the dimensions. @Morgen

Nice one, thanks! @dingledooper

Also this Wiki page says that whitespace is ignored in the data section of PBM format, which might help to get rid of the join. However, all the online PBM viewer I found fail to read images without whitespace, so not sure which is correct here.

Would it be shorter if we just pad sufficient n[0]s on both sides? @SurculoseSputum

@newbie Yep! 128 bytes. I start with a row of length 61, which make sure that after 15 iterations, the middle 31 pixels are still correct. (Each iteration loses 2 correct pixel on both end). 1 more golf added: only pad the left side, since c[u:u+3] works even when u+3 is out of bound.

Wolfram Language (Mathematica), 42 bytes
¯\_(ツ)_/¯
Image@CellularAutomaton[#,{{1},0},15]&

n=30

n=26

Since this challenged changed to gode-golf I applied the changes that @Dan the Man proposed and saved some bytes.
The images now should have inverted colors

Does this produce a correctly-sized image for rules that don't grow at light speed in both directions?

@mypronounismonicareinstate No, it does not; this is actually talked about in the Possible Issues section in documentation. Instead of 15 it should be {15,All}. Additionally, several bytes can be saved by replacing ArrayPlot with Image and using @ (prefix notation) rather than brackets.

@DanTheMan when I posted this answer, this quuestion was not a code-golf one. Now that it changed I will apply your changes. Thanks for golfing it!

Sledgehammer, 24 19 bytes
(alternatively, 18.625)
Obtained from the Wolfram code ExportString[ArrayPlot[CellularAutomaton[Input[], {{1}, 0}, {15, All}]], "SVG"].
Outputs via (as you could easily tell) SVG. The ExportString part can be dropped, but then it will output a Graphics object - it's basically an image, but it's hard to view without loading it into Mathematica or exporting it via Export/ExportString.
⣕⢼⡔⡼⣂⡏⢂⠌⢤⡾⣧⣾⢴⠮⣯⠴⢒⣈⣱

05AB1E, 57 bytes
"P1 31 16",¾16иJD"ÿ1ÿ"16E©D¦¨Sðý,31Lε<®s.$3£C7αIsè}J"0ÿ0"

a (bad) port of this python answer
Try it online!

47 bytes. Although I don't think your current port (nor my shorter one) is a correct port of the Python answer.. If I use the inputs 11100001 (225) or 11110011 (243) I get a different output than the output of the Python TIO.

The issue is you are padding with zeros on the left and right, if I am understanding your code. This technique only works for even rules.

MATL, 36 bytes
Thanks to @AdHocGarfHunter for pointing out a mistake, now corrected
l30Ya!15:"GyFTYa3YC!XBQ)]v16:46Z)0YG

Input is binary in reverse order. Output is white for active cell, black for inactive.
Try it at MATL Online!
Explanation
l       % Push 1
30Ya    % Padarray: pads 1 with 30 zeros on each side. Gives a column vector.
        % This large amount of padding is necessary to avoid edge effects in
        % the output
!       % Transpose into a row vector
15:"    % Do the following 15 times
  G     %   Push input
  y     %   Duplicate from below: pushes a copy of the latest row vector
  FTYa  %   Pad with one zero to the left and one to the right
  3YC   %   Matrix of length-3 sliding blocks arranged as columns
  !     %   Transpose. Each block is now a row
  XB    %   Convert each row from binary to a number
  Q     %   Add 1 (this is needed because indexing is 1-based)
  )     %   Index the input with these numbers. This applies the automaton
        %   rule to each length-3 block, producing a new generation
]       % End
v       % Concatenate all row vectors into a matrix
16:46   % Push [16 17 ... 46]: indices of the columns to be kept
Z)      % Use as column indices
0YG     % Write to image file. This is implicitly displayed by MATL Online

This seems to behave strangely for [1 1 0 1 1 1 1 0]

@AdHocGarfHunter Thanks. I'll take a look later. Deleting in the meantime

@AdHocGarfHunter I think it works fine. Did you notice the input is in reverse order?

I'm not sure how the order can be in reverse.  I was noting that it implements the edge conditions improperly.

@AdHocGarfHunter I don't follow. Your suggested input seems to give the same output using my code and using this other for example

It seems that answer has the same error.  The issue is you are padding with zeros on the left and right, if I am understanding your code.  This doesn't work for odd rules (for your program this is rules that start with 1).

@AdHocGarfHunter I see the problem now. Thanks

@AdHocGarfHunter It should be corrected now. Thanks for pointing out the mistake!

Haskell, 175 158 154 bytes
t=take 16
f=t$0:f
(a:b)!s=s<$>p(a:a:b)
p(a:b:c:d)=(4*a+2*b+c):p(b:c:d)
p[a,b]=[4*a+3*b]
m s=putStr"P1 33 16 ">>mapM_ print`mapM_`t(iterate(!(s!!))$f++1:f)

Try it online!
Outputs to a pbm file with white being off and black being on.  You can switch the on and off colors at no cost to bytes.
Sample outputs
Rule 30

Raw

Increased size

Rule 121

Raw

Increased Size

Aren't there grayscale PGMs, which should be even simpler to output? (I don't remember the magic number, but it should be easy to find)

@mypronounismonicareinstate I had a look ant P1 reduces the size a bit.  Not only does it only require 1 number per pixel it also don't require a color depth.

Java, 247 bytes
import java.awt.image.*;r->{BufferedImage i=new BufferedImage(31,16,1);int[]p=((DataBufferInt)i.getRaster().getDataBuffer()).getData();p[15]=-1;for(int a=31;a<496;a++)p[a]=r<<31-(p[a==31?0:a-32]<<2&4|p[a-31]<<1&2|p[a==495?0:a-30]&1)>>31;return i;}

repl.it
Before minimizing:
rule -> {
    BufferedImage image  = new BufferedImage(31, 16, BufferedImage.TYPE_INT_RGB);
    int[]         pixels = ((DataBufferInt)image.getRaster().getDataBuffer()).getData();
    pixels[15]           = -1;
    for (int i = 31; i < 496; i++)
        pixels[i] = rule << 31 - (pixels[Math.max(0, a - 32)] << 2 & 4 |
                                  pixels[i - 31] << 1 & 2 |
                                  pixels[i == 495 ? 0 : i - 30] & 1) >> 31;
    return image;
};

Inner magic ungolfed:
BOTTOM_LEFT_PIXEL_WHICH_IS_WRITTEN = 465;
int upLeft  = pixels[Math.max(0, i - 32)];
int up      = pixels[i - 31];
int upRight = pixels[i - 30 == BOTTOM_LEFT_PIXEL_WHICH_IS_WRITTEN ? 0 : i - 30];
int code    = ((upLeft << 2) & 4) | ((up << 1) & 2) | (upRight & 1);
int newBit  = (rule >> code) & 1;
pixels[i] = newBit == 0 ? 0x00000000 : 0xFFFFFFFF;

Notes: The code could be even shorter if the output image was allowed to be 32 pixels wide instead of 31. It could be even shorter if 'active' pixels may be  impossibly invisible dark blue (#000001)
It could surely be shorter with pbm output, but I like to see my stuff directly.