Jump to content
View in the app

A better way to browse. Learn more.

Andhrafriends.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Code Cleanliness Ante Enti

Featured Replies


[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
  • Views 3.6k
  • Created
  • Last Reply

Top Posters In This Topic

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.

maximum sum sub arr? 

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

 

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 

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

maximum sum sub arr? 

 

simialr kind

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

Looks to me a variation of all combinations of a string

okka mukka artam ayite ottu, lekapote nannu chepu teesuku kottu

okka mukka artam ayite ottu, lekapote nannu chepu teesuku kottu


Nayak29.gif?1389325916

 

okka mukka artam ayite ottu, lekapote nannu chepu teesuku kottu


Nayak29.gif?1389325916

 

Nitya+Menon.gif

  • Author

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

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

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

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/

Will try evening

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.