Skip to content

Instantly share code, notes, and snippets.

View maksadbek's full-sized avatar
💭
Chilling

Maksadbek maksadbek

💭
Chilling
View GitHub Profile
package main
import (
"fmt"
)
type item struct {
value interface{} //value as interface type to hold any data type
next *item
}

Keybase proof

I hereby claim:

  • I am maksadbek on github.
  • I am maksadbek (https://keybase.io/maksadbek) on keybase.
  • I have a public key ASDxk49bUd8ci5rY6JODHCe_JEpdyWsw-bxlyfjyWU-jtwo

To claim this, I am signing this object:

@maksadbek
maksadbek / LetsDestroyC.md
Created March 5, 2020 10:26 — forked from shakna-israel/LetsDestroyC.md
Let's Destroy C

Let's Destroy C

I have a pet project I work on, every now and then. CNoEvil.

The concept is simple enough.

What if, for a moment, we forgot all the rules we know. That we ignore every good idea, and accept all the terrible ones. That nothing is off limits. Can we turn C into a new language? Can we do what Lisp and Forth let the over-eager programmer do, but in C?


@maksadbek
maksadbek / FB-PE-InterviewTips.md
Created February 29, 2020 20:11 — forked from ameenkhan07/FB-PE-InterviewTips.md
Facebook Production Engineering Interview

What to Expect and Tips

• 45-minute systems interview, focus on responding to real world problems with an unhealthy service, such as a web server or database. The interview will start off at a high level troubleshooting a likely scenario, dig deeper to find the cause and some possible solutions for it. The goal is to probe your knowledge of systems at scale and under load, so keep in mind the challenges of the Facebook environment.
• Focus on things such as tooling, memory management and unix process lifecycle.

Systems

More specifically, linux troubleshooting and debugging. Understanding things like memory, io, cpu, shell, memory etc. would be pretty helpful. Knowing how to actually write a unix shell would also be a good idea. What tools might you use to debug something? On another note, this interview will likely push your boundaries of what you know (and how to implement it).

Design/Architecture 

Interview is all about taking an ambiguous question of how you might build a system and letting

1:5 -- 1 * 3 * 1
2:5 -- 3 * 1 * 1
3:5 -- 1 * 5 * 1
4:5 -- 5 * 8 * 1
3:5 -- 1 * 8 * 1
3:4 -- 1 * 5 * 8
2:5 -- 3 * 5 * 1
2:3 -- 3 * 1 * 5
4:5 -- 5 * 8 * 1
2:5 -- 3 * 8 * 1
package main
import (
"fmt"
"time"
)
func mergeWithRange(chans ...chan int) chan int {
out := make(chan int)
#include <bits/stdc++.h>
using namespace std;
void print_set(int s) {
printf("%d: ", s);
for(int i = 1; 0 < s; i++) {
if((s & 1) == 1) {
printf("%d, ", i);
# python3
"""
Simplex algorithm.
nonbasics = [1, 2, 3]
basics = [4, 5, 6]
matrix = [
[0, 0, 0, 0, 0, 0, 0],

Directive for displayed math (math that takes the whole line for itself).

The directive supports multiple equations, which should be separated by a blank line:

.. math::

(a + b)^2 = a^2 + 2ab + b^2 (a - b)^2 = a^2 - 2ab + b^2

In addition, each single equation is set within a split environment, which means that you can have multiple aligned lines in an equation, aligned at & and separated by \\:

def heapify(a, n, i):
largest = i
l = 2 * i + 1
r = 2 * i + 2
if l < n and a[i] < a[l]:
largest = l
if r < n and a[largest] < a[r]:
largest = r