GithubHelp home page GithubHelp logo

dsa-cpp's Introduction

Data Structures and Algorithms (DSA) are crucial topics in technical interviews. The frequency of questions can vary, but here's a list of commonly asked DSA topics, ranked by their prevalence:

  1. Arrays: Questions related to arrays are quite common. These may include finding pairs with a given sum, stock trading, and subarray problems.
  2. Linked Lists: Expect questions about reversing linked lists, detecting cycles, merging sorted lists, and finding the middle element.
  3. Strings: String manipulation problems are frequent. Examples include finding the longest substring without repeating characters and checking for anagrams.
  4. Binary Trees: Topics like maximum depth, tree structure comparison, and inverting binary trees are often asked.
  5. Algorithms: Algorithms like quicksort, radix sort, and other miscellaneous ones are part of interviews.
  6. Graphs: Graph-related questions cover topics like traversals, shortest paths, and connectivity.
  7. Heaps: Understanding heaps and their applications is essential.
  8. Dynamic Programming: Expect questions on dynamic programming techniques.
  9. Bit Manipulations: Solving problems using bitwise operations is another area of focus.

Top Array Questions:-

  1. Finding the Missing Number: Given an integer array from 1 to 100, find the missing number.
  2. Detecting Duplicate Numbers: Identify the duplicate number(s) in a given integer array.
  3. Max and Min in Unsorted Array: Find the largest and smallest numbers in an unsorted integer array.
  4. Pairs with Given Sum: Determine all pairs of integers in an array whose sum equals a given number.
  5. Handling Multiple Duplicates: Detect duplicate numbers even when the array contains multiple duplicates.
  6. Removing Duplicates: Remove duplicates from a given array.
  7. Searching in Rotated Array: Search for a target value in a rotated array.
  8. Longest Consecutive Elements Sequence: Given an unsorted array of integers, find the length of the longest consecutive elements sequence.
  9. Kth Largest Element: Find the Kth largest element in an unsorted array.
  10. Product of Array Except Self: Compute the product of all elements except the current one.
  11. Trapping Rain Water: Calculate the amount of water trapped between bars in a histogram.
  12. Best Time to Buy and Sell Stock: Determine the maximum profit achievable by buying and selling stocks.
  13. Rotate Array: Rotate an array to the right by a given number of steps.
  14. Majority Element: Find the element that appears more than n/2 times in an array.
  15. Subarray with Maximum Sum: Identify the contiguous subarray with the largest sum.
  16. Merge Intervals: Merge overlapping intervals in an array.
  17. Next Permutation: Generate the next lexicographically greater permutation of an array.
  18. Jump Game: Determine if you can reach the last index in an array of non-negative integers.
  19. Valid Sudoku: Check if a partially filled Sudoku board is valid.
  20. Counting Sort: Implement counting sort for sorting integers within a specific range.

Top Linked List Questions:-

  1. Print the Middle of a Linked List: Find the middle element in a singly linked list.
  2. Reverse a Linked List: Reverse the order of elements in a singly linked list.
  3. Reverse a Doubly Linked List: Reverse the direction of a doubly linked list.
  4. Rotate a Linked List: Rotate the elements of a linked list by a given number of positions.
  5. Nth Node from the End: Find the Nth node from the end of a linked list.
  6. Delete Last Occurrence of an Item: Remove the last occurrence of a specific value from the list.
  7. Remove Duplicates from Sorted List: Eliminate duplicate elements from a sorted linked list.
  8. Detect Loop in Linked List: Determine if a linked list contains a loop.
  9. Delete N Nodes After M Nodes: Delete N nodes after every M nodes in a linked list.
  10. Merge Two Linked Lists at Alternate Positions: Combine two linked lists by alternating their elements.
  11. Circular Linked List Traversal: Traverse a circular linked list.
  12. Deletion from a Circular Linked List: Remove a specific element from a circular linked list.
  13. Implement Queue using Linked List: Create a queue using a linked list.
  14. Implement a Stack using Singly Linked List: Build a stack using a singly linked list.
  15. Remove Every K-th Node: Delete every K-th node from the linked list.
  16. Pairwise Swap of Nodes: Swap adjacent nodes in pairs.
  17. Occurrence of an Integer: Count the occurrences of a specific integer in the list.
  18. Sort a Linked List of 0s, 1s, and 2s: Arrange a list containing 0s, 1s, and 2s.
  19. Intersection Point in Y-Shaped Linked Lists: Find the intersection point of two Y-shaped linked lists.
  20. Add Two Numbers Represented by Linked Lists: Add two numbers represented by linked lists.

dsa-cpp's People

Contributors

areyoukhush avatar

Watchers

 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.