Jump to content

Code Cleanliness Ante Enti


Recommended Posts

Posted


[font='Helvetica Neue']Please remember the coding portion of this test will be judged on code cleanliness, not just functionality. Write nice, clean code. If we suspect that your code has been plagiarized (we have a filter that detects this), this will result in an automatic fail and disqualification from any future consideration... So please make an honest effort![/font]


ela attempt cheyali

less loops use recursive be careful with the naming convention of variables and methods put all frequently called methods in utils class . Make utils a singleton inka chala vuntay
  • Replies 64
  • Created
  • Last Reply

Top Posters In This Topic

  • GunturGongura

    12

  • chaikumar

    11

  • uncertainity

    10

  • puli_keka

    9

Posted

less loops use recursive be careful with the naming convention of variables and methods put all frequently called methods in utils class . Make utils a singleton inka chala vuntay

 

Bhayya, akkada 1-2 hrs coding test untundi. Andulo ila recursion lu, singleton lu, utils class lu ante time saripodu. Of course, some problems can be solved easily by recursion, then we can use it. Otherwise, there is no need to use recursion if it can be done easily with loops.

 

Clean code ante...ilanti coding tests lo easily readable/understandable code with appropriate variable names.

 

1 hour test ki max 2 functions rayochu. 2-3 hours test ki oka 3-4 functions. 

 

Getting a compilable solution and a working solution that works for all the testcases is more important. Then time complexity and space complexity are important. How many times you are looping over the input and how much extra space you are using ni optimize cheyyali.

Posted

maximum sum sub arr? 

Have u tried working on subsetsum & subset printing problem anytime?

 

Posted

code cleanliness hacker rank antunav kadabti

proper comments

indentation

proper variable name 

avoid using too many variable creation example avoid strings when there are many string manipulation instead use sb 

Posted

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.....

Posted

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.....

Looks to me a variation of all combinations of a string
Posted

Looks to me a variation of all combinations of a string

okka mukka artam ayite ottu, lekapote nannu chepu teesuku kottu

Posted

 

okka mukka artam ayite ottu, lekapote nannu chepu teesuku kottu


Nayak29.gif?1389325916

 

Nitya+Menon.gif

Posted

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.....

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

Posted

Its like to find Power Set actually..sorry if i confused few 

 

Power Set Power set P(S) of a set S is the set of all subsets of S. For example S = {a, b, c} then P(s) = {{}, {a}, {b}, {c}, {a,b}, {a, c}, {b, c}, {a, b, c}}.

Posted

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

 

I didnot work in python... but ..the thing is use any language....

but print powerset ade problem try cheyi

Posted

Its like to find Power Set actually..sorry if i confused few

Power Set [font='Open Sans']Power set P(S) of a set S is the set of all subsets of S. For example S = {a, b, c} then P(s) = {{}, {a}, {b}, {c}, {a,b}, {a, c}, {b, c}, {a, b, c}}.[/font]


http://www.geeksforgeeks.org/power-set/
×
×
  • Create New...