Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Algorithms, Data Structures, Language Concepts, System Design

License

NotificationsYou must be signed in to change notification settings

rp-code9/programming

Repository files navigation

  1. System Design Questions
  2. Java OOP Concepts
  3. C++ Concepts
  4. Operating System Concepts
  5. Reading-References
  6. Algorithms and Data Structures

Large scale system design and object oriented design questions and topics

  1. Keywords To Remember
  2. Infrastructure Design Questions
  3. System Design Questions
  4. Object Oriented Design Questions
  5. External References

Short sample programs to demonstrate the inbuilt object oriented concepts in Java language.

  • Generics
  • Equality
  • String Representation of Object
  • Hash code of Object
  • Dynamic array
  • Iterable
  • Comparable
  • assert
  • Comparator
  • Immutability

Short sample program to demonstrate C++ language basics

  • Smart pointers
  • move semantics
  • move constructor
  • move assignment
  • enums & enum class
  • Random numbers
  • Synchronization
    • Simple producer consumer with busy wait, mutex in C++Link
    • Simple producer consumer withcondition variable, condition variable in C++Link
  • File IO
    • Print all lines which contain a given patternLink
  • Memory Management
    • Implement alignedmalloc() andfree()Link
    • Implementmalloc() andfree()Link
  • Hash table implementation
    • Implement elementary hash table in C++Link
    • Hash table implementation in C++ using STLInspiration  Link

Reading-References

Algorithms and Data Structures

  1. Google CodeJam
  2. Algorithms
  3. LeetCode
  1. Google Code Jam 2018
  2. Google Code Jam 2020

Princeton Algorithms Course

Princeton AlgorithmsPart 1 andPart2

Comprehensive guides/wiki/articles/solutions/summary

  • A general approach to backtracking questions (Subsets, Permutations, Combination Sum)Link
  • A summary: how to use bit manipulation to solve problems easily and efficientlyLink

Linked List

  • Rearrange odd even elements in a linked list.C++
  • Linked ListJava
  • Alternating SplitJava
  • Sort linked list
    • Simple methodC++
    • Using merge sortC++
  • Clone list with random pointersC++
  • Linked List implementation
    • Push, append, delete, pop, clone listC

Stack

Queue

Priority Queue and Heap

Binary Tree

  • Binary tree
    • Recursive Preorder, inorder, postorder, height, diameterC++
  • Construct balanced binary treeC++
  • Find longest increasing path in binary treeC++
  • Find longest increasing path in n-ary treeC++
  • Find next right node in binary treeC++
  • Count all possible distinct sums paths top-down in a binary tree.C++

Symbol table and Search Trees

  • Binary Search Tree
    • Java
    • Recursive insert, search, construct balanced treeC++
    • Iterative insert, searchC++
  • Interval Search TreeJavaC++

Union Find

  • Quick FindJava
  • Quick UnionJava
  • Weighted Quick UnionJava
  • Weighted Quick Union with Path compressionJava
  • Percolation ProblemJava

Graph

  • Find the celebrity in room.C++
  • Graph
    • Representation using STL, BFS, DFSC++

String

  • Parse decimal, hexdecimal, octal from a file and output to another.C++
  • Check if two strings are isomorphic.C++
  • Find first unique character in a string.C++
  • String sorting
    • Using trie data structureJava
  • Auto Completion search
  • English word meaning dictionary
  • Longest Common Prefix
  • Pattern Searching
    • Using trie of all suffixJava
  • Word Break problem
    • Using trie, recursive algorithmJava
  • KMP Pattern searching
    • Search pattern in textJava
  • Remove characters from a first string which are present in other stringC  C++<<<<<<< HEAD=======
  • Interleaved string
    • Print interleaved string of 2 stringsC++
    • Find if a string is interleaved of two other stringsC++

Add disjoint set and interleaved string

Trie

  • Spell checker.C++
  • Trie data structure.Java

Arrays, 2D arrays, matrices

  • Continuous onesJava
  • Infections over a distanceJava
  • 8 PuzzleJava
  • Maximum sum rectangle in a 2D matrixC++

Sorting

  • Insertion sort (generic)JavaC++
  • Selection sort (generic)Java
  • Shell sort (generic)Java
  • Merge sort (generic)JavaC++
  • Bottom Up Merge (generic)Java
  • Quicksort (generic)JavaC++
  • 3-way Quicksort (generic)Java
  • Dutch national flag problemC++
  • Merge intervalsC++
  • Meeting roomsC++

Searching

  • Find peak elementC++
  • Search in rotated arrayC++
  • Search in a 2D matrixC++
  • Find start and end of a range in a sorted arrayC++
  • Find kth largest element
    • Using min heapC++
    • Using max heapC++
    • Using STL iterator and algorithmC++
    • Using quick select algorithmC++
  • Binary Search

Dynamic Programming

  • Word Break problem
    • Recursive algorithm, using trieJava
  • Longest Common Subsequence
    • Naive, top-down, bottom up tabulation, LCS string, LCS of 3 stringsJava
    • Naive recursion, top-down memoization, space optimized, bottom up tabulationC++
  • Shortest Common Supersequence
  • Longest Common Substring
    • Recursive, bottom-up, space optimized, print substring, without repeating charactersJava
  • Longest Common Substring in array
    • Stem in an array of stringsJava
  • Subsequence variants: Repeated Subsequence
    • top-down, naive recursion, print sequenceJava
  • Levenshtein distance / Edit DistanceJava
  • Largest sqaure submatrix of 1sJava
  • Min cost path from top right to bottom down in matrixJava
  • Maximum value of expressionJava
  • Subset sum partitionJava
  • Three PartitionJava
  • Rod CuttingJava
  • Rod Cutting ProductJava
  • Coin Change - Minimum number of coins
  • Coin Change WaysJava
  • Binary String with no consecutive 1sJava
  • Word BreakJava
  • Word Break using trieJava
  • Array Adjustment costJava
  • No of ways for dice throwsJava
  • Wildcard MatchingJava
  • Tripping Rain WaterJava
  • Jump GameC++
  • Length of Longest Increasing SubsequenceC++

Greedy

  • Activity SelectionJava
  • Activity Sequencing

Maths, Stats, Ordered Stats

  • kth element, Quick SelectJava
  • Shuffling : usingFisher–Yates shuffle algorithm    Java
  • GaussElimination : Gauss elimination or Gauss Jordan method to solve system of linear equationsJava
  • Point2D : Data structure to represent point in 2D spaceJava
  • Point3D : Data structure to represent point in 3D spaceJava
  • Generate Nth row of Pascal triangle
  • Happy numberWikiC++
  • Excel Sheet Column NumberC++
  • Number of zeros in facorialC++
  • Implement power functionC++
  • Implement square root functionC++

Permutation

  • Permutation of objectsJava
  • Unique pathsC++

Encoding decoding (char, int, digits etc)

  • Print all possible decoding of given digit sequence.C++
  • Print all possible decoding of given digit sequence.C++

Other data structures/ Implement some data structure

  • Find the celebrity in room.C++
  • Maximum possible length by cutting N wood pieces into K pieces.C++
  • Merge N trasactions preserve order.C++
  • Stock Buy Sell to Maximize Profit.C++
  • Find majority element.Problem
  • CPU task schedulingC++
  • Activity/Task : representation of an activity or a taskJava
  • Randomized setProblemC++
  • Disjoint set
    • Naive implementationC++
    • Path compression, union by rankC++

Bit manipulation/ Bitwise hacks

Computational Geometry

  • Closest pair of points : Divide and conquer algorithmJava
  • Collinear pointsJava
  • Group points which are at distance less than k : brute force algorithmJava
  • Group points which are at distance less than k : divide and conquer algorithmJava

Random data generation

  • Random String : generate random stringJava
  • Random 2D Matrix : generate random 2D boolean, binary or integer matrixJava

Leetcode

Array

  • Running sum  Problem
    • using loop, using partial sum, using accumulateC++

Maths

  • Top K frequent elements    Problem
    • Using hashmap and sortingC++
    • Using hashmap and priority queueC++
    • Using Quick SelectC++

String

Singly Linked List

Binary Tree

  • Max depth    Problem
  • Validate Binary search Tree    Problem
    • Validate BSTC++
  • Symmeric Binary Tree    Problem
  • Level Order Of Tree    Problem
  • Sorted Array to Binary Search Tree    Problem
  • Inorder traversal    Problem
    • Iterative using stackC++
    • RecursiveC++
  • Zigzag/spiral level order traversal    Problem
  • Construct Binary Tree from Preorder and Inorder Traversal    Problem
  • Populating Next Right Pointers in Each NodeProblem
    • Iterative level orderC++
    • Using queueC++
  • Kth Smallest Element in a BST    Problem
    • Iterative using stackC++
    • RecursiveC++
  • Kth Largest Element in a BST | ?? | ? |
    • Iterative using stackC++
    • RecursiveC++
  • Number of Islands    Problem
    • Using DFSC++
    • Using BFSC++
    • Using disjoint setC++

Permutations

  • Letter Combinations of a Phone Number    Problem
  • Generate Balanced Parentheses    Problem

Backtracking


[8]ページ先頭

©2009-2025 Movatter.jp