## Create a digital clock using Python-Turtle￼

Prerequisites: Turtle in programming Python. Turtle is a special feature of Python. Using Turtle, we can easily draw on a drawing board. First, we import the turtle module. Then create a window, next we create a turtle object and using the turtle methods we can draw on the drawing board. In this blog we’ll be […]

## How to start programming? Step By Step Guide

Programming is the key to getting success in a tech carrier, when I talk about programming I mean efficient programming. It means the coding which is time and space-efficient. How can we make programs which is time and space-efficient by learning data structure and Algorithms? So that’s why data structure and algorithms are so much […]

## What are the good websites to learn data structures and algorithms?

Well! Programming is fun once you get it and the great part is a decent developer gets an enormous check from Top Tech Giants Like (Google, Amazon, Walmart, Microsoft, Facebook, and Apple). Data Structure and algorithms are needed for breaking interviews in these first-rate organizations. Regardless of whether you are a fledgling or middle in Algorithm abilities […]

## Search an element in a sorted and rotated array

An element in a sorted array can be found in O(log n) time via binary search. But suppose we rotate an ascending order sorted array at some pivot unknown to you beforehand. So for instance, 1 2 3 4 5 might become 3 4 5 1 2. Devise a way to find an element in the […]

## Program to cyclically rotate an array by one

Given an array, cyclically rotate the array clockwise by one.  Examples: Input: arr[] = {1, 2, 3, 4, 5} Output: arr[] = {5, 1, 2, 3, 4} Following are steps for Array Rotation.  Store last element in a variable say x.  Shift all elements one position ahead.  Replace first element of array with x. Output […]

## C Program for Fibonacci numbers

The Fibonacci numbers are the numbers in the following integer sequence.0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, …….. In mathematical terms, the sequence Fn of Fibonacci numbers is defined by the recurrence relation  Fn = Fn-1 + Fn-2 with seed values  F0 = 0 and F1 = 1. Given […]

## Program to find the pair with a given sum in an array

We are given an array that is sorted and then rotated around an unknown point. Find if the array has a pair with a given sum ‘x’. It may be assumed that all elements in the array are distinct. Examples :  Input: arr[] = {11, 15, 6, 8, 9, 10}, x = 26 Output: true […]

## Block Swap algorithm for array rotation

Write a function rotate(ar[], d, n) that rotates arr[] of size n by d elements using block swap algorithm Algorithm : Initialize A = arr[0..d-1] and B = arr[d..n-1]1) Do following until size of A is equal to size of B a) If A is shorter, divide B into Bl and Br such that Br […]

## C Program to implement Binary Search

We are given a sorted array of size n. We have to write program to find an element x in arr[]. In the previous post we have implemented linear search. Now we are going to implement another approach to search it. This approach is called Binary Search. Binary Search – Search an element in sorted […]