Skip to main content

43 docs tagged with "Java"

View All Tags

Binary To String

Given a real number between 0 & 1 (eg. 0.72) that is passed in as double, print the binary representation.


Number of bits you have to flip to convert bits A to bits B

Flip Bit To Win

Find the largest sequence of 1 that can be obtained by flipping a 0 to 1.

Group Anagrams

Write a method to sort an array ot strings so that all tne anagrams are next to each other.

List Of Depth

Given a binary tree, design an algorithm which creates a linked list of all

Minimal Tree

Given a sorted (increasing order) array with unique integer elements, write

Paint Fill

Implement the"paint fill" function that one might see on many image editing programs.

Pairwise Swap

Write a program to swap odd and even bits in an integer with as few instructions as


Implement an algorithm to print all valid (i.e., properly opened and closed) combinations

Rank From Stream

Imagine you are reading in a stream of integers. Periodically, you wish

Sorted Merge

You are given two sorted arrays, A and B, where A has a large enough buffer at the

Sparse Search

Given a sorted array of strings that is interspersed with empty strings, write a