Giter Club home page Giter Club logo

geeks4geekstop80interviewqs's Introduction

Geeks4GeeksTop80InterviewQs

My solutions for https://www.geeksforgeeks.org/top-10-algorithms-in-interview-questions/ (Added html file to repo) in both Python and Java.

Questions:

Graph

  1. Breadth First Search (BFS)
  2. Depth First Search (DFS)
  3. Shortest Path from source to all vertices Dijkstra
  4. Shortest Path from every vertex to every other vertex Floyd Warshall
  5. To detect cycle in a Graph Union Find
  6. Minimum Spanning tree Prim
  7. Minimum Spanning tree Kruskal
  8. Topological Sort
  9. Boggle (Find all possible words in a board of characters)
  10. Bridges in a Graph

Extra:

  1. Detect Cycle in a Directed Graph
  2. Trie | (Insert and Search)

Linked List

  1. Insertion of a node in Linked List (On the basis of some constraints)
  2. Delete a given node in Linked List (under given constraints)
  3. Compare two strings represented as linked lists
  4. Add Two Numbers Represented By Linked Lists
  5. Merge A Linked List Into Another Linked List At Alternate Positions
  6. Reverse A List In Groups Of Given Size
  7. Union And Intersection Of 2 Linked Lists
  8. Detect And Remove Loop In A Linked List
  9. Merge Sort For Linked Lists
  10. Select A Random Node from A Singly Linked List

Extra:

  1. Merge two sorted linked lists

Dynamic Programming

  1. Longest Common Subsequence
  2. Longest Increasing Subsequence
  3. Edit Distance
  4. Minimum Partition
  5. Ways to Cover a Distance
  6. Longest Path In Matrix
  7. Subset Sum Problem
  8. Optimal Strategy for a Game
  9. 0-1 Knapsack Problem
  10. Boolean Parenthesization Problem

Sorting And Searching

  1. Binary Search
  2. Search an element in a sorted and rotated array
  3. Bubble Sort
  4. Insertion Sort
  5. Merge Sort
  6. Heap Sort (Binary Heap)
  7. Quick Sort
  8. Interpolation Search
  9. Find Kth Smallest/Largest Element In Unsorted Array
  10. Given a sorted array and a number x, find the pair in array whose sum is closest to x

Tree / Binary Search Tree

  1. Find Minimum Depth of a Binary Tree
  2. Maximum Path Sum in a Binary Tree
  3. Check if a given array can represent Preorder Traversal of Binary Search Tree
  4. Check whether a binary tree is a full binary tree or not
  5. Bottom View Binary Tree
  6. Print Nodes in Top View of Binary Tree
  7. Remove nodes on root to leaf paths of length < K
  8. Lowest Common Ancestor in a Binary Search Tree
  9. Check if a binary tree is subtree of another binary tree
  10. Reverse alternate levels of a perfect binary tree

Number Theory

  1. Modular Exponentiation
  2. Modular multiplicative inverse
  3. Primality Test | Set 2 (Fermat Method)
  4. Euler’s Totient Function
  5. Sieve of Eratosthenes
  6. Convex Hull
  7. Basic and Extended Euclidean algorithms
  8. Segmented Sieve
  9. Chinese remainder theorem
  10. Lucas Theorem

BIT Manipulation

  1. Maximum Subarray XOR
  2. Magic Number
  3. Sum of bit differences among all pairs
  4. Swap All Odds And Even Bits
  5. Find the element that appears once
  6. Binary representation of a given number
  7. Count total set bits in all numbers from 1 to n
  8. Rotate bits of a number
  9. Count number of bits to be flipped to convert A to B
  10. Find Next Sparse Number

String / Array

  1. Reverse an array without affecting special characters
  2. All Possible Palindromic Partitions
  3. Count triplets with sum smaller than a given value
  4. Convert array into Zig-Zag fashion
  5. Generate all possible sorted arrays from alternate elements of two given sorted arrays
  6. Pythagorean Triplet in an array
  7. Length of the largest subarray with contiguous elements
  8. Find the smallest positive integer value that cannot be represented as sum of any subset of a given array
  9. Smallest subarray with sum greater than a given value
  10. Stock Buy Sell to Maximize Profit

geeks4geekstop80interviewqs's People

Watchers

James Cloos avatar Manjit Chakravarthy 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.