Skip to content

Instantly share code, notes, and snippets.

@Grogal
Grogal / The Technical Interview Cheat Sheet.md
Created May 8, 2018 13:00 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
public static class CameraUtils
{
private static readonly Vector3 VectorZero = new Vector3(0,0,0);
private static readonly Vector3 VectorForward = new Vector3(0,0,1);
public static Vector3 ScreenCoordToWorldWithPlane(this UnityEngine.Camera camera, Vector3 screenCoord)
{
var plane = new Plane(VectorForward, VectorZero);
var ray = camera.ScreenPointToRay(screenCoord);
float enter;
@Grogal
Grogal / TagsAndLayersTool.cs
Created June 9, 2017 23:50 — forked from daemon3000/TagsAndLayersTool.cs
A tool for Unity that generates type safe tags and layers
#region [Copyright (c) 2014-2017 Cristian Alexandru Geambasu]
// Distributed under the terms of an MIT-style license:
//
// The MIT License
//
// Copyright (c) 2014-2017 Cristian Alexandru Geambasu(daemon3000@hotmail.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software
// and associated documentation files (the "Software"), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
@Grogal
Grogal / Entitas-BT.cs
Created April 29, 2017 23:07 — forked from mzaks/Entitas-BT.cs
Sketch for Entitas-CSharp Behaviour Tree implementation
// Based on http://www.gamasutra.com/blogs/ChrisSimpson/20140717/221339/Behavior_trees_for_AI_How_they_work.php
public enum NodeStatus
{
Success, Failure, Running
}
public interface IBehaviorNode
{
NodeStatus Execute(Entity entity);
@Grogal
Grogal / TinyTween.cs
Created April 16, 2017 15:33
A single file tween library in C# with support built in for XNA and Unity data types. MIT License.
// TinyTween.cs
//
// Copyright (c) 2013 Nick Gravelyn
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software
// and associated documentation files (the "Software"), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge, publish, distribute,
// sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
@Grogal
Grogal / tickSystem.cs
Created September 12, 2016 18:56
TickSystem.cs
public void Initialize()
{
_pool.SetTick(0, 0, 0);
// Start coroutine
MainThreadDispatcher.StartUpdateMicroCoroutine(DelayedUpdateWithAccumulatorCoroutine());
}
private IEnumerator DelayedUpdateWithAccumulatorCoroutine()
{
var sw = new Stopwatch();
@Grogal
Grogal / ChangeType.cs
Created July 25, 2016 17:10 — forked from juanarzola/ChangeType.cs
UniRx observable wrappers for Entitas entity and group events
using System;
namespace Entitas {
/** Used in the *AnyChangeObservable methods to observe multiple change types */
[Flags]
public enum ChangeType : short{
Addition = 1 << 0,
Replacement = 1 << 1,
Removal = 1 << 2,
@Grogal
Grogal / SceneField.cs
Created June 28, 2016 13:34
Scene Field with Drawer
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
[System.Serializable]
public class SceneField
{
[SerializeField]
private Object m_SceneAsset;
[SerializeField]
///
/// Simple pooling for Unity.
/// Author: Martin "quill18" Glaude (quill18@quill18.com)
/// Latest Version: https://gist.github.com/quill18/5a7cfffae68892621267
/// License: CC0 (http://creativecommons.org/publicdomain/zero/1.0/)
/// UPDATES:
/// 2015-04-16: Changed Pool to use a Stack generic.
///
/// Usage:
///