Blogs Hub

by AskGif | Oct 03, 2020 | Category :coding

Binary Watch - Immutable - Array - Easy - LeetCode

Binary Watch - Immutable - Array - Easy - LeetCode

A binary watch has 4 LEDs on the top which represent the hours (0-11), and the 6 LEDs on the bottom represent the minutes (0-59). Each LED represents a zero or one, with the least significant bit on the right. <br />For example, the above binary watch reads "3:25". Given a no

read more...

by AskGif | Jul 16, 2018 | Category :coding

Generate all the possible k-ary strings of length and digit upto k

Generate all the possible k-ary strings of length and digit upto k

You have been given an integer n that corresponds to the length of the array and k which corresponds to the digit value possible in the array. The task is to print all the possible strings using those k values of length n. the array can consist only value digits up to k. Java Solution:</p

read more...

by AskGif | Jul 16, 2018 | Category :coding

Generate all possible strings of n bits.

Generate all possible strings of n bits.

You have been given an integer n that corresponds to the number of bits in an array. the task is to print all the possible strings using those n bits. the array can consist only boolean values (i.e either 0 or 1) We will be solving this problem using recursion. <pre class="language-j

read more...