Skip to content

vishalguptahmh/programmingInterviewQuestions

Repository files navigation

Programming Interview Questions

Sortings(with time and space complexity)

  • Bubble Sort
  • Insertion Sort
  • Selection Sort
  • Merge Sort
  • Quick Sort

Strings

  • Check a String is palindrome or not
  • Remove any given character from a String
  • Find out longest palindrome in a given string
  • Find the first non repeated character of a given String
  • Count the occurrence of a given character in a String
  • Check if two String are Anagram
  • Convert numeric String to int in Java
  • Reverse words in a given string
 input :Hi I am vishal
 output: vishal am I Hi
  • Permutations of a given string
input : ABC
output : ABC ACB BAC BCA CAB CBA 
  • Check if string is rotated by certain number then we get original string
input : 3
vishal
halvis
output: yes
  • Remove Duplicate char from string

LinkList

  • Find the middle element of a singly linked list in one pass

  • Check if a given linked list contains a cycle/loop?find the starting node of the cycle and remove the loop

  • Find Merge point of Two singly linklist

  • Reverse a linked list with recursion and without recursion

  • Remove duplicate nodes in an unsorted linked list

  • Find the 4th node from the end in a singly linked list

  • Find the sum of two linked lists using Stack

  • Rotate a Linked List

      input: 2
             12345
      output:34512
    
  • Reverse a Linked List in groups of given size

    input : 2
    1234
    output: 2143
    
  • Merge two sorted linked lists and final output is sorted

  • Add two numbers represented by linked lists

    input:
    1->2
    3->4
    output: 4>6 (sum of 12 + 34 =46)
    
  • Check if Linked List is Palindrome

  • Implement Queue using Linked List

  • Implement Stack using Linked List

  • Given a linked list of 0s, 1s and 2s, sort it

  • Delete without head pointer and printing function is given

    input : 5 
            1234567
    output: 123467
    

    Tree

  • Binary tree in preorder with and without recursion

  • Count a number of leaf nodes in a given binary tree

  • Perform a binary search in a given array

  • Find the depth of a binary tree

  • Find Height of Binary Tree example

  • Print InOrder ,postorder,preorder traversal of a BT with and without recursion

  • Check if a Binary tree is a BST or not

  • Tree is balanced or not

  • Print Left View of Binary Tree example

  • Print Bottom View of Binary Tree example

  • Print a Binary Tree in Vertical Order example

  • Level order traversal in spiral form example

  • Lowest Common Ancestor in a BST example

  • Convert a given Binary Tree to Doubly Linked List example

  • Write Code to Determine if Two Trees are Identical or Not example

  • Given a binary tree, check whether it is a mirror of itself example

  • Maximum Path Sum example

  • Diameter of a Binary Tree example

  • Check if given Binary Tree is Height Balanced or Not example

  • Serialize and Deserialize a Binary Tree example


    Mathematics For Topcoders

    https://www.topcoder.com/community/competitive-programming/tutorials/mathematics-for-topcoders/

About

In this you will get list of programming interview questions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages