1. What is a String?
    A sequence of characters stored in contiguous memory.
  2. Are strings mutable?
    Depends on language (immutable in Java, Python).
  3. How to reverse a string?
    Use two-pointer approach or built-in functions.
  4. Check palindrome string?
    Compare characters from both ends.
  5. What is substring?
    Continuous part of a string.
  6. What is subsequence?
    Characters in order but not necessarily continuous.
  7. Find length of string?
    Using length function or loop.
  8. Count vowels?
    Traverse and check vowels.
  9. Remove spaces?
    Replace or filter characters.
  10. Convert case?
    Use built-in functions.
  11. Check anagram?
    Sort strings or use frequency array.
  12. Find duplicate characters?
    Use hashmap.
  13. First non-repeating character?
    Frequency count.
  14. Remove duplicates?
    Set or visited array.
  15. String concatenation?
    Join two strings.
  16. Find frequency of characters?
    Use hashmap.
  17. Longest substring without repeating?
    Sliding window.
  18. Check rotation of string?
    s1+s1 contains s2.
  19. Find all substrings?
    Nested loops.
  20. Find longest palindrome substring?
    Expand around center.
  21. Implement strstr?
    Pattern matching.
  22. KMP algorithm?
    Efficient pattern matching.
  23. Rabin-Karp?
    Hash-based pattern matching.
  24. Z-algorithm?
    Pattern matching technique.
  25. Split string?
    Use delimiter.
  26. Trim string?
    Remove leading/trailing spaces.
  27. Replace character?
    Use replace method.
  28. Check substring?
    Use contains method.
  29. Reverse words in string?
    Split and reverse.
  30. Count words?
    Split by space.
  31. Check valid parentheses?
    Use stack.
  32. Minimum insertions palindrome?
    DP approach.
  33. Longest common prefix?
    Compare strings.
  34. String compression?
    Count repeating chars.
  35. Roman to integer?
    Mapping values.
  36. Integer to Roman?
    Greedy approach.
  37. Decode string?
    Stack-based.
  38. Check isomorphic strings?
    Mapping characters.
  39. Group anagrams?
    Sort keys.
  40. Word break problem?
    DP.
  41. Minimum window substring?
    Sliding window.
  42. Longest repeating character replacement?
    Window technique.
  43. Check balanced string?
    Stack.
  44. Remove adjacent duplicates?
    Stack.
  45. Find all permutations?
    Backtracking.
  46. Check subsequence?
    Two-pointer.
  47. Count palindromic substrings?
    Expand center.
  48. Edit distance?
    Dynamic programming.
  49. Longest common subsequence?
    DP.
  50. Shortest common supersequence?
    DP.

🔹 PART 2: LINKED LIST (Q51–Q100)

  1. What is Linked List?
    A linear data structure of nodes connected by pointers.
  2. Types?
    Singly, Doubly, Circular.
  3. Advantages?
    Dynamic size.
  4. Disadvantages?
    No random access.
  5. What is node?
    Contains data and pointer.
  6. Insert at beginning?
    Update head pointer.
  7. Insert at end?
    Traverse and add node.
  8. Delete node?
    Adjust pointers.
  9. Search element?
    Traverse list.
  10. Reverse linked list?
    Iterative or recursive.
  11. Find middle?
    Slow and fast pointer.
  12. Detect cycle?
    Floyd’s algorithm.
  13. Remove cycle?
    Find meeting point.
  14. Merge two lists?
    Compare nodes.
  15. Sort linked list?
    Merge sort.
  16. Remove duplicates?
    Use set or pointer.
  17. Find nth node?
    Traverse.
  18. Find nth from end?
    Two pointers.
  19. Check palindrome?
    Reverse second half.
  20. Intersection point?
    Two pointers.
  21. Rotate list?
    Adjust pointers.
  22. Flatten list?
    Merge lists.
  23. Add two numbers?
    Digit by digit sum.
  24. Clone list?
    Hashmap.
  25. Segregate even odd?
    Two lists.
  26. Reverse in k-group?
    Group reversal.
  27. Remove nth node?
    Two pointers.
  28. Swap nodes?
    Change pointers.
  29. Partition list?
    Based on pivot.
  30. Merge k lists?
    Heap.
  31. Sort 0s,1s,2s?
    Counting.
  32. Delete middle?
    Slow-fast pointer.
  33. Odd-even list?
    Rearrange nodes.
  34. Split list?
    Divide into halves.
  35. Convert to BST?
    Inorder method.
  36. Detect loop start?
    Floyd algorithm.
  37. Remove duplicates sorted?
    Skip duplicates.
  38. Remove duplicates unsorted?
    Hashset.
  39. Reorder list?
    Merge halves.
  40. Find length?
    Traverse.
  41. Check circular?
    Loop detection.
  42. Split circular list?
    Two pointers.
  43. Insert in sorted list?
    Find position.
  44. Delete last node?
    Traverse to second last.
  45. Copy random pointer list?
    Hashmap or O(1) method.
  46. Reverse doubly list?
    Swap next-prev.
  47. Flatten multilevel list?
    DFS approach.
  48. Remove zero sum sublist?
    Prefix sum.
  49. Find pair sum?
    Two-pointer (DLL).
  50. LRU cache?
    DLL + hashmap.

📢 Join Our WhatsApp Channel

💼 Get Daily IT Job Updates, Interview Preparation Tips & Instant Alerts directly on WhatsApp.

👉 Join WhatsApp Now

📢 Join Our Telegram Channel

💼 Get Daily IT Job Updates, Interview Tips & Exclusive Alerts directly on Telegram!

👉 Join Telegram

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright © 2022 - 2025 itfreesource.com

Enable Notifications OK No thanks