Category: Algorithm

  • Big-O complexity of popular algorithms

    Hello folks- Hope you’re doing well. Big-O notations are very useful approach to show the worst case time complexity of any operation or algorithm. Big-O specifies the upper bound of a function in the asymptotic analysis and are widely used in the software development. Type Symbol Operation/ Algorithm Number of operations (n= 10) Execution Time…

  • String Reversal In Several Ways

    Reversing a string is a popular question in most campus hiring interviews. There could be several ways one can think of to do this. We will be looking at some of those. In this article we will not look at the Reverse method provided by the .NET libraries; we will instead try to implement it…

  • Implement Square Root Method

    Hello friends, I am here again with another example where we will see how to find square root of a number without using .NET library method. Let’s start with basic one though it’s not efficient as it considers all the number starting from 0.001 till the difference of multiplying both numbers and the number given…

  • Calculate Fibonacci Series

    Hello mates, This is one of the most asked question in interviews, calculating and printing Fibonacci series. Let’s first try the iterative approach that is simple and prints all the Fibonacci series by passing the length. Please note that we are starting the series from 0 (instead of 1). public static voidFibonacci_Iterative(int len) {     int a = 0, b = 1, c = 0;     Console.Write(“{0} {1}”, a,b);     for (int i = 2; i < len; i++)     {         c= a + b;…