Skip to content

nimit95/Programming-Questions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Programming-Questions

Programming Question in C++

Recursion

  • Binary Search
  • Array is sorted or not
  • Number of zeroes in an integer
  • Reversing an integer
  • Reversing a string
  • Given k find the geometric Sum i.e. 1 + 1/2 + 1/4 + 1/8 + ... + 1/(2^k)
  • Given two strings check if one is reverse of other
  • Write a program to count all the possible paths from top left to bottom right of a MXN matrix with the constraints that from each cell you can either move only to right or down
  • Remove consecutive duplicate from string
  • Runing up a staircase with n steps, and can hop either 1 step, 2 steps or 3 steps at a time. Possible ways can run up to the stairs.
  • Given a String print all the subsets. e.g. for input = abc you need to print a, b, c, ab, ac, bc, abc using recursion.
  • Given an array and a number N, find all subsets which sum up to N. (pairs, triplets, etc.)
  • Using the phone keypad return all possible words that can be produced given input digits. e.g. 23 > “ad, ae, af, bd, be, bf, cd, ce, cf

Linked List

  • Linked List Implementations including insertion deletion
  • Reverse a given LinkedList
  • Append the last n elements of a linked list to the front. e.g. for 1 -> 2 -> 3 -> 4 -> 5 -> 6 -> null and n = 2 return 5 -> 6 -> 1 -> 2 -> 3 -> 4 -> null.

About

Programming Questions in C++

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages