Freshworks Interview Question

1b) Generate binary numbers till given N.

Interview Answers

Anonymous

Feb 24, 2017

public static void main(String[] args) { // TODO Auto-generated method stub int n=100; String[] a= new String[n]; a[0]="0"; a[1]="1"; for(int i=2;i

3

Anonymous

Aug 23, 2016

Gave a brute force solution, O(N^2).

3