>Post an algorithm without revaling what it does
>We try to figure out what it is
>>54870799
Dijkstra's algorithm?
var foo = function(arr) {
for (var i = 0; i < arr.length; i++) {
var key = arr[i];
var j = i;
while (j >= 0 && arr[j - 1] < key) {
arr[j] = arr[j - 1];
j--;
}
arr[j] = key;
}
return arr;
}
collection.push(collection.splice(i, 1)[0]);
>>54870877
Insertion sort that sorts values in an array from highest to lowest
function kek = function(S, W) {
var m = 0;
var i = 0;
var T = foo(W);
while (m + i < S.length) {
if (W[i] == S[m + i]) {
if (i == W.length - 1) return m;
i++;
} else if (T[i] > -1) {
m = m + i - T[i];
i = T[i];
} else {
m = m + i + 1;
i = 0;
}
}
return S.length;
}
>>54870799
Hard mode.
Don't think any of you fags can reverse engineer this :)AAA macro size:req
LOCAL startOfRegion, cloop, movEdxLabel, eaxJump
if USE_AAA
option epilogue:none ; We use a RET in the middle
; Part 1
push esi
pop eax
mov esi, edi
mov edi, eax
push $-6
push 0BBBBDDDDh
xor ecx,ecx
pop dx
movEdxLabel:
mov edx, size
xchg edi, esi
ret
; Part 2
mov eax, [esp-4]
push edi
push ebx
mov ebx, size/4
mov edx, 5A175A17h
xchg ecx,ebx
xchg esi,eax
push eax
mov edi, 0FAFAFAFAh
add esi, 66 ; Offset from esi to end of the macro
or ebx, ecx
cloop:
xor eax,eax
xor [esi+edx*4], edi
shl edi,1
add edi,edx
add edx, 0DDCCAABBh
xchg edx,eax
div ecx
mov eax,ebx
dec eax
jnz eaxJump
pop edi
pop ebx
pop esi
jmp short movEdxLabel+1
eaxJump:
xchg eax, ebx
mov eax, esi
sub eax, 36
jmp eax
startOfRegion:
option epilogue:EpilogueDef
endif
endm
>>54870799
You guys will never find out what it does :^)for (var i=1; i<=100; i++) {
if (i % 3 === 0 && i % 5 === 0) {
console.log("FizzBuzz") }
else if (i % 3 === 0) {
console.log("Fizz") }
else if (i % 5 === 0) {
console.log("Buzz") }
else {
console.log(i) }
}
>>54871111
Gets you through a technical interview in a web dev company.
What do I win?
>>54871111
Nice meme
>>54870799SqlConnection thisConnection = new SqlConnection(@"Data Source=localhost;
Initial Catalog=default;
Persist Security Info=True;
User ID=user;
Password=B1GT1tti3z");
thisConnection.Open();
string Get_Data =
@"DECLARE @start INT = 1;
DECLARE @end INT = 100;
WITH numbers AS (
SELECT @start AS number
UNION ALL
SELECT number + 1
FROM numbers
WHERE number < @end
)
SELECT *
FROM numbers
WHERE number % 2 <> 0
OPTION (MAXRECURSION 0);";
SqlCommand cmd = thisConnection.CreateCommand();
cmd.CommandText = Get_Data;
SqlDataAdapter sda = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
sda.Fill(dt);
var ayy = dt.AsEnumerable().ToList();
foreach (var number in ayy)
{
WriteLine(number.ItemArray[0]);
}
>>54871179
Reduce.
>>54871179
That's an FFT butterfly diagram
>>54871111
Holy fuck sticks quads
>>54871111
Nice quads. Made a shell version because it looks to fucking simliar.for ((i = 1 ; i <= 100 ; i++)) {
if [ $((i % 3)) = 0 ] && [ $((i % 5)) = 0 ]; then
printf 'FizzBuzz\n'
elif [ $((i % 3)) = 0 ]; then
printf 'Fizz\n'
elif [ $((i % 5)) = 0 ]; then
printf 'Buzz\n'
else
printf '%s\n' "$i"
fi
}
>>54871304
correct
>>54871111
Winner
>>54870947
Serious love