Code Pumpkin

Category Archives: Pumpkin Practice

Subscribe

Program to find nth digit of the series 3, 5, 6, 9, 10, 12, …

August 20, 2017
Posted by Pumpkin

Bit Manipulation programming questions are integral part of any online coding challenges or programming rounds of 3-4 year exp Java/C/Python developer interviews. So, why are we talking about bit manipulation in this series problem? Lets look at the binary representation of all the numbers in this series. Decimal Digit Binary Representation 3 0011 5 0101 6 […]

Program to check if a given number is power of two or not?

August 20, 2017
Posted by Pumpkin

In this post, we will discuss about one of the easiest and commonly asked Bit Manipulation Interview Question i.e. Write a program to check if a given number is power of two or not?   This post is continuation of our previuos article Program To Find Number Of Set Bits In The Number.  Both of the approach […]

Program to find number of set bits in the Binary number

August 20, 2017
Posted by Pumpkin

In this post, we will discuss about one of the easiest and commonly asked Bit Manipulation Interview Question i.e. Find total number of set bits in the given number?  There are many approach to solve this problem. Here, we will discuss about below two approaches: & and >> Approach (Naive Approach) Brian Kernighan's Approach 1) & and >> Approach […]

Program to find Unique Array Element

July 30, 2017
Posted by Pumpkin

Programming and coding interview questions are an integral part of any Java, Python or C++ application developer interview. No matter on which language you have expertise, good problem solving skills shows how efficient you are in solving any problem.  In this post, we will discuss one of the very commonly asked programming question. .!! Problem Statement: In […]

Program to Check Whether a Number is Prime or Not

July 5, 2017
Posted by Pumpkin

Prime Number A prime number can be divided, without a remainder, only by itself and by 1. For example, 13 can be divided only by 13 and by 1, so it is a prime number. In other words, When the only two factors of a number are 1 and the number, then it is a Prime […]

Sudoku checker (By traversing each cell only once)

March 31, 2017
Posted by Pumpkin

Sudoku is a logic-based combinatorial number-placement puzzle. Given a partially filled 9×9 2D array i.e. grid[9][9], the goal is to assign digits (from 1 to 9) to the empty cells so that every row, column, and subgrid of size 3×3 contains exactly one instance of the digits from 1 to 9. For Detailed understanding about Sudoku, […]

Snakes N Ladders | Java Program Implementation

March 31, 2017
Posted by Pumpkin

Snakes N Ladders is an ancient Indian board game regarded today as a worldwide classic. It is played between two or more players on a gameboard having numbered, gridded squares. A number of "ladders" and "snakes" are pictured on the board, each connecting two specific board squares. The object of the game is to navigate one's game […]

Tic Tac Toe | Java Program Implementation

March 31, 2017
Posted by Pumpkin

Tic Tac Toe (also known as Noughts and crosses or Xs and Os) is a paper-and-pencil game for two players, X and O, who take turns marking the spaces in a 3×3 grid. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row wins the game. If you are interested in java […]


Total Post : 80
Subscribe
Contribute Your Articles

Interview Experiences

Related Books

Like Us On Facebook

Alexa Page Rank