sharmadhiraj / top-100-interview-programming-questions

A repository dedicated to solving the top 100 interview programming questions sourced from https://shirsh94.medium.com/5c5bf36449ab

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Top 100 Interview Programming Questions

Welcome to Top 100 Interview Programming Questions! This repository, written in Dart, is dedicated to solving the top 100 interview programming questions sourced from this article.

Additional tests are added to ensure code accuracy.

Implementation: 79 out of 100 questions completed.
Test coverage: 79 out of 100 questions completed.

Run tests

You can run tests with

dart test

Programming Questions

Random

  1. Swap variable Swap two variables without using a third variable.
  2. Sort array Sort an array without using sort function.
  3. Second-largest element in array Find second-largest element in array.
  4. N prime numbers Generate first N prime numbers.
  5. Reverse string Reverse given string without loop or reverse function.
  6. Add matrices Add two matrices.
  7. Count character occurrence Count occurrences of characters in a given string.
  8. Number to words Convert given number to words.
  9. Matching characters in two strings Find matching characters in two strings.
  10. Vowels & Consonants counter Count number of vowels and consonants in give string.
  11. Factors Find factors of a given number.
  12. Fibonacci numbers Generate first n fibonacci numbers.
  13. LinkedList node by index Get nth node of LinkedList.
  14. Search node Get index of node in LinkedList.
  15. Remove special characters Remove special characters from given string without regex.
  16. Find missing and duplicate_number Find missing and duplicate number from give array.
  17. String permutations Find all permutations of given string.
  18. Valid Sudoku Determine if a 9 x 9 Sudoku board is valid.
  19. Check palindrome number Check if given number is palindrome (without converting to string).
  20. Average of array Calculate the average of all numbers in a given array.
  21. Check leap year Check if given year is leap year.
  22. Check palindrome number Check if given number is palindrome (without converting to string).
  23. Check narcissistic number Check if given number is narcissistic number (is a number that is the sum of its own digits each raised to the power of the number of digits).
  24. Remove duplicates from array Remove duplicate items from array.
  25. Binary search Find item index in array using Binary Search.
  26. Sum of natural numbers Calculate sum of first n natural numbers.
  27. Nearest smaller number Find nearest smaller numbers of left side of array.
  28. Minimum number of coins Calculate the minimum number of coins required for value.
  29. Array indices of target sum Find indices of two numbers with target sum.

Array

  1. Remove duplicates from array Remove duplicate items from array.
  2. Search in rotated array Search for target value in rotated array.
  3. Missing number Find missing number in array.
  4. Duplicate number Find the duplicate number in array.
  5. Smallest & Largest element Find the smallest and largest element for integer array(list).
  6. Array indices of target sum Find indices of two numbers with target sum.
  7. Remove duplicates in array in place Remove the duplicate elements from array in place.
  8. Rotate array Rotate given array by rotation value.
  9. Duplicate elements Find duplicate elements from given array.
  10. Index of target element Find starting and ending position of a given target value in ascending ordered array.
  11. Longest consecutive subarray Find the maximum length of subarray with consecutive elements.
  12. In place QuickSort Integer array sorted in place using the quicksort algorithm.
  13. Largest sum of subarray Contiguous subarray which has the largest sum.
  14. Reverse array Reverse given array in place.
  15. Remove duplicates Remove duplicate elements from array without using special function.
  16. Byte array to String Convert a Byte Array to a String.
  17. LinkedList example LinkedList implementation example.
  18. Binary search Perform binary search in a given array.
  19. Median of sorted arrays merged Merge two sorted arrays and calculate median.
  20. Duplicate elements Find duplicate elements from given array.

Linked List

  1. Reverse Linked List Reverse a LinkedList.
  2. Add element in middle Add an element in the middle of Linked List.
  3. Intersection of Linked List Find the node at which the intersection of two Linked List begins.
  4. Palindrome Linked List Check if a given linked list is a palindrome.
  5. Middle of Linked List Find the middle element of a Linked List.
  6. Cycle Linked List Check if a given linked list contains a cycle.
  7. Third last node Find the third node from the end in a Linked List.
  8. Sum of Linked List Sum of two Linked List.
  9. Delete List Node by value Delete all occurrences of a given ListNode by value in given LinkedList.
  10. Reverse Linked List Reverse a LinkedList.
  11. Sort Linked List Sort given LinkedList in ascending order.
  12. LinkedList example LinkedList implementation example.
  13. Remove nth last node Remove nth node from the end of a Linked List.
  14. Merge Linked List Merge two sorted Linked List.
  15. Linked List To BST Convert a sorted Linked List to a Binary Search Tree.
  16. Linked List Partition by x Partition a linked list by a value x, placing nodes less than x before those greater than or equal to x.
  17. Remove duplicates (Sorted Linked List) Remove duplicate nodes from a sorted Linked List.
  18. Reverse Linked List Reverse a LinkedList.
  19. Remove duplicates (Unsorted Linked List) Remove duplicate nodes from an unsorted Linked List.
  20. Length of Linked List Find the length of a Linked List.

String

  1. Reverse string (In place) Reverse a given string in place.
  2. Find duplicate characters Find duplicate characters from a string.
  3. Anagram string Check if two strings are anagrams of each other.
  4. Permutations of string Find all the permutations of a string.
  5. Reverse string (Recursion) Reverse a given string using recursion.
  6. String with digits Check if a string contains only digits.
  7. Find duplicate characters Find duplicate characters from a string.
  8. Vowels & Consonants counter Count number of vowels and consonants in give string.
  9. Find character occurrence Count the occurrence of a given character in a string.
  10. First non-repeated character Find the first non-repeated character from a string.

About

A repository dedicated to solving the top 100 interview programming questions sourced from https://shirsh94.medium.com/5c5bf36449ab


Languages

Language:Dart 100.0%