Git Product home page Git Product logo

sdeinterviewprep's Introduction

SDEInterviewPrep (2020)

This repository is updated frequently to reflect my preparation for software engineering interviews in 2020.

Data Structures

Java Interface and Implementation Hierarchy

Tip: Declare with interface, instantiate with implementation.
Exception: For PriorityQueue, use PriorityQueue for declaration and instantiation.

Internal Implementations

Alternative Representations

  • Serialize and deserialize trees (Regular / BST)

Algorithms

Bit Manipulations

Building Blocks

// check k-th bit
(x >> k) & 1

// Set k-th bit to 1
x = x | (1 << k)

// Set k-th bit to 0
x = x & ~(1 << k)

Practical Usage of XOR

COMING SOON

Binary Search

Classical Binary Search

Usage
Pitfall

Binary Search with Post-Processing

  • Find first occurrence
  • Find last occurrence
  • Search in shifted sorted array
  • Search in bitonic array

Binary Search Advanced Applications

  • Median of two sorted arrays
  • K closest in sorted array
  • K closest in two sorted arrays

Sorting Algorithms

  • Selection sort (array / two stacks)
  • Merge sort (array / linked list)
  • Quick sort

Pointer and Pivot

  • Move 0s to the end (order not maintained / maintained)
  • Dutch national flag problem

Linked List

  • Reverse linked list (reverse all / two at a time / k at a time)
  • Middle node
  • Cycle (cycle existence / cycle position)
  • Reorder list
  • Partition list
  • List palindromicity
  • Merge sorted lists (two lists / k lists)
  • Linked list arithmetics (addition / subtraction)

Stacks and Queues

  • Queue by two stacks
  • Stack by queues
  • Min stack
  • Deque by three stacks

Trees

  • Tree properties (height / balanced / complete / symmetric / is binary search tree)
  • Tree iterative traversals (preorder / inorder / postorder)
  • Binary search tree basic operations (search / insert / delete)
  • Build trees based on traversals
  • Least Common Ancestor problems (without parent pointer / with parent pointer)
  • Iterator problems

Priority Queue and Best First Search

  • Kth problem (Kth smallest in unsorted array, Kth closest points to origin in 3D)
  • Bipartite graph

Depth First Search

  • Subsets
  • Permutations (numbers / valid parentheses)
  • Combinations
  • Coin change
  • N Queens

Strings

Dynamic Programming

  • Subarray and subsequence (ascending / sum)
  • Array hopper (can reach destination / minimum jumps)
  • "Cutting" problem
  • Edit distance
  • Largest Shape Problem

Java Language

  • Final, finalize, finally
  • Static
  • Abstract class vs. interface
  • Types of classes
  • Overload vs. Override
  • Comparable and Comparator
  • Exception handling
  • Concurrency

Object-Oriented Design

COMING SOON

System Design

COMING SOON

Full-Stack Development

COMING SOON

sdeinterviewprep's People

Contributors

garydmg avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.