Skip to content

Category Archives: Python Programs

Write an efficient program to count number of 1s in binary representation of an integer. Examples : Input : n = 6 Output : 2… Read More
Given pointer to the head node of a linked list, the task is to reverse the linked list. We need to reverse the list by… Read More
A permutation, also called an “arrangement number” or “order, ” is a rearrangement of the elements of an ordered list S into a one-to-one correspondence… Read More
Write an efficient program to find the sum of contiguous subarray within a one-dimensional array of numbers which has the largest sum. Recommended: Please solve… Read More
Given an array of positive integers. All numbers occur even number of times except one number which occurs odd number of times. Find the number… Read More
Given a positive integer, write a function to find if it is a power of two or not.Examples :   Input : n = 4 Output… Read More