GunturGongura Posted February 12, 2016 Author Report Posted February 12, 2016 I didnot work in python... but ..the thing is use any language.... but print powerset ade problem try cheyi Ok
uncertainity Posted February 12, 2016 Report Posted February 12, 2016 Any java,J2ee,advanced java guys??
pandugadu999 Posted February 12, 2016 Report Posted February 12, 2016 ee coding ki oka dandam ra babu..
chaikumar Posted February 12, 2016 Report Posted February 12, 2016 ok ya …..kani python lo list untundi..like[1,2,3,5] subsets are[1],[2]….[1,2,3,5] e {1} notation ni emantaru python lo? these flower brackets basically are dictionaries with key and value
chaikumar Posted February 12, 2016 Report Posted February 12, 2016 ok ya …..kani python lo list untundi..like[1,2,3,5] subsets are[1],[2]….[1,2,3,5] e {1} notation ni emantaru python lo? these flower brackets basically are dictionaries with key and value
k2s Posted February 12, 2016 Report Posted February 12, 2016 Will try eveningjust checking... Evening ayindi...
puli_keka Posted February 12, 2016 Report Posted February 12, 2016 just checking... Evening ayindi... It's still 1:40 no just came back from lunch
k2s Posted February 12, 2016 Report Posted February 12, 2016 It's still 1:40 no just came back from lunch antey... TS EST emo kada.. Akkada evening ayindi kada ani
GunturGongura Posted February 12, 2016 Author Report Posted February 12, 2016 ok ya …..kani python lo list untundi..like[1,2,3,5] subsets are[1],[2]….[1,2,3,5] e {1} notation ni emantaru python lo? these flower brackets basically are dictionaries with key and value Entidi
chaikumar Posted February 12, 2016 Report Posted February 12, 2016 Entidi I was driving and accidentally hit reply button. He just gave an example for output, showing with curly braces. You can use lists or sets in python to store these subsets and then print them.
rikki Posted February 12, 2016 Report Posted February 12, 2016 Output: 1, 2, 3, 5, 1, 2, 1, 3, 1, 5, 2, 2, 2, 3, 2, 5, 3, 2, 3, 3, 3, 5, 1, 2, 3, 1, 2, 5, 1, 3, 3, 1, 3, 5, 2, 2, 3, 2, 2, 5, 2, 3, 3, 2, 3, 5, problem enti ante 1,3, 3 kuda printing...aa print statement lo distinct unte ne print cheyi anali..like print[j]< print[j+1[ public void SubSetsMain() { int[] arr = new int[4]{1,2,3,5}; int[] printarr = new int[arr.Length]; int index =0; for (int i = 0; i < arr.Length; i++) { FindSubSets(arr, 0, arr.Length, i, printarr, index); } Console.ReadLine(); } public void FindSubSets(int[] arr, int start, int end, int numberofelements, int[] printarr, int index) { if (numberofelements == 0) { for (int j = 0; j < index; j++) Console.Write(printarr[j] + ", "); Console.WriteLine(); return; } for(int i = start; i<= end - numberofelements; i++) { printarr[index] = arr[i]; FindSubSets(arr, start + 1, end, numberofelements-1, printarr, index + 1); } } given input : {1,2,3,5} subsets are print output: {1}{2}{3}{5} {1,2}{1,3}{1,5}{2,3}{2,5}{2,5}{3,5} {1,2,3}{1,2,5}{1,3,5}{2,3,5} {1,2,3,5} ================================================ sum vishayaniki vosthe .. prathi dhani sum print cheyal anthe.....
uncertainity Posted February 15, 2016 Report Posted February 15, 2016 Huffman coding ..practice for today
GunturGongura Posted February 15, 2016 Author Report Posted February 15, 2016 Uncertainity Kasta interview guide chey for ms students for entry level n interns Em adgutaru
Recommended Posts