/logic_practice

Primary LanguageC++MIT LicenseMIT

logic_practice

  1. Palindrome
    • Given a string, you have to predict whether it can be changed into a palindrome or not by changing the positions of the characters.
  2. FizzBuzz
    • Write a short program that prints each number from 1 to n on a new line.
    • For each multiple of 3, print "Fizz" instead of the number.
    • For each multiple of 5, print "Buzz" instead of the number.
    • For numbers which are multiples of both 3 and 5, print "FizzBuzz" instead of the number.
  3. Fibonacci
    • Fibonacci sequence, such that each number is the sum of the two preceding ones.
  4. Sort
    • Bubble sort.
    • Insertion sort.
    • counting sort.
  5. Prime number