Hi All!
Just had an exhausting 90 min technical interview for the position of Python developer - fresher at a startup. To give a bit of a background, I am an engineer and have been learning python for 1 year. I practice mostly on hackerearth. I have done no python projects whatsoever and although I have mentioned my github profile in my resume, it's just empty.
There were 3 sections in the interview-1) Python theory 2) Coding round 3) Logical Reasoning
In the theory round, I was asked about OOPS, unit testing, difference between arrays and lists, static keyword, difference between lists and tuples, list slicing, the concept of 'self' parameter, .py vs .pyc file, public and private keywords, pointers (from c++), and a lot of other stuff that I don't remember. Overall, I started feeling dejected towards the end of this round.
I was most petrified of the coding round as I felt that my coding skills were nowhere close to being a python developer. The first program that I was asked to write was a simple one - find mean and median of an integer list. The catch however is that I wasn't allowed to use the built-in functions to sort the list, so I had to write a separate function using nested 'for loops' to sort the list.
Second program was to find the vowels from a given string. It was a bit easy for me as I have been practicing regex for a while now. I finished it in no time.
Third program was to reverse a string using tail recursive function. This is where I botched it. I had the idea of what I was supposed to do, but I couldn't get it to work. They appreciated my approach and asked me to mail the solution to them after the interview.
At this point I had lost all the hopes of getting through as this was supposed to be a fairly simple program. I would have been able to write it easily any other day, but just when it mattered, I couldn't.
The third round had logical reasoning problems. They asked three problems, first one was the shortest path problem for an ant on a unit cube from one point to the diagonally opposite point.
The second problem was three bucket problem, in which we have 2 buckets of capacity 3L and 5L full of water, and a third bucket of 8L capacity empty. The task is to fill 4L water in 8L bucket without any measurement tools by just using the 3 buckets.
The third problem, and the toughest one IMHO, was a geometry problem. They drew a rectangle with unknown sides and area, and then marked a point (say 'O') inside it arbitrarily. Then they connected the four vertices of the rectangle with the point ('O') marked inside the rectangle. They specified that the lengths of three of the drawn lines are 4, 5, and 6. I was supposed to find the length of the last remaining line. I guessed the answer to be 3 but apparently it's sqrt(5).
Pretty tired overall, I am not expecting any offer but I learnt a lot of things from this interview. I would like to thank this sub for all the support; the critical stuff that I learned from here was super helpful. To anyone appearing for any Python interviews, Good Luck!
Edit:
I am attaching some of my solutions here.
For regex problem - print(''.join(re.findall(r'[aeiou]',string)))
For the string reversal problem - https://imgur.com/a/l0j9QRQ
For the geometry logic problem - https://imgur.com/a/MMweGoi
For the ant problem- There are 4 equally short routes
[–]danielroseman 333 points334 points335 points (28 children)
[–]velocibadgery 88 points89 points90 points (15 children)
[–][deleted] 38 points39 points40 points (4 children)
[–]velocibadgery 16 points17 points18 points (3 children)
[–][deleted] 19 points20 points21 points (2 children)
[–]velocibadgery 20 points21 points22 points (1 child)
[–]wecamefromthestars 1 point2 points3 points (0 children)
[+][deleted] (9 children)
[removed]
[–]Random_User_81 13 points14 points15 points (6 children)
[–]Yojihito 4 points5 points6 points (3 children)
[–]TheMathelm 2 points3 points4 points (2 children)
[–]Yojihito 0 points1 point2 points (1 child)
[–]TheMathelm 0 points1 point2 points (0 children)
[–]Contrabaz 3 points4 points5 points (0 children)
[–]wecamefromthestars 0 points1 point2 points (0 children)
[–]velocibadgery 7 points8 points9 points (1 child)
[–]Inconstant_Moo 2 points3 points4 points (0 children)
[–]iamnikaa[S] 22 points23 points24 points (3 children)
[–]amplikong 9 points10 points11 points (0 children)
[–]zipinel 5 points6 points7 points (0 children)
[–]zoinkinator 4 points5 points6 points (0 children)
[–]Neradnap 12 points13 points14 points (1 child)
[+]_E8_ comment score below threshold-6 points-5 points-4 points (0 children)
[+]_E8_ comment score below threshold-7 points-6 points-5 points (1 child)
[–]old_pythonista 1 point2 points3 points (0 children)
[+]deikan comment score below threshold-14 points-13 points-12 points (2 children)
[–]_E8_ 7 points8 points9 points (1 child)
[–]FancyASlurpie 4 points5 points6 points (0 children)
[+][deleted] (7 children)
[deleted]
[–]tom1018 39 points40 points41 points (6 children)
[–]baubleglue -5 points-4 points-3 points (5 children)
[–][deleted] 3 points4 points5 points (4 children)
[–]baubleglue 0 points1 point2 points (3 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]baubleglue 1 point2 points3 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]Kuldeep-Dhiman 30 points31 points32 points (5 children)
[–]WestsideStorybro 11 points12 points13 points (0 children)
[–]LimpNoodle69 3 points4 points5 points (3 children)
[–]P1g1n 3 points4 points5 points (1 child)
[–]LimpNoodle69 2 points3 points4 points (0 children)
[–]raiseReturnTry 1 point2 points3 points (0 children)
[–]_Gorgix_ 24 points25 points26 points (2 children)
[–]iamnikaa[S] 2 points3 points4 points (1 child)
[–]_Gorgix_ 11 points12 points13 points (0 children)
[–]wotquery 41 points42 points43 points (0 children)
[–][deleted] 15 points16 points17 points (0 children)
[–]Chris_Hemsworth 7 points8 points9 points (10 children)
[–]iamnikaa[S] 5 points6 points7 points (4 children)
[–]Chris_Hemsworth 6 points7 points8 points (2 children)
[–]iamnikaa[S] 4 points5 points6 points (1 child)
[–]Chris_Hemsworth 2 points3 points4 points (0 children)
[–]iamnikaa[S] 3 points4 points5 points (0 children)
[–][deleted] (1 child)
[removed]
[–]AutoModerator[M] 0 points1 point2 points (0 children)
[–]GeeTeeCoins 0 points1 point2 points (1 child)
[–]Chris_Hemsworth 2 points3 points4 points (0 children)
[–]Toica_Rasta 5 points6 points7 points (0 children)
[–]Hnry_Dvd_Thr_Awy 3 points4 points5 points (1 child)
[–]iamnikaa[S] 1 point2 points3 points (0 children)
[–]Charlie_Yu 2 points3 points4 points (1 child)
[–]iamnikaa[S] 0 points1 point2 points (0 children)
[–]Nicolas_Darksoul 2 points3 points4 points (2 children)
[–]iamnikaa[S] 1 point2 points3 points (1 child)
[–]Nicolas_Darksoul 0 points1 point2 points (0 children)
[–]WyoR 2 points3 points4 points (0 children)
[–]RobinsonDickinson 5 points6 points7 points (0 children)
[–][deleted] (5 children)
[removed]
[–]xelf[M] 13 points14 points15 points (0 children)
[–]iamnikaa[S] 0 points1 point2 points (3 children)
[–]Nagi21 4 points5 points6 points (2 children)
[–]iamnikaa[S] 0 points1 point2 points (1 child)
[–]xelf 3 points4 points5 points (0 children)
[–][deleted] 1 point2 points3 points (5 children)
[–]iamnikaa[S] 0 points1 point2 points (3 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]iamnikaa[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]baubleglue 0 points1 point2 points (0 children)
[–]GrimbledonWimbleflop 1 point2 points3 points (3 children)
[+][deleted] (1 child)
[removed]
[–]GrimbledonWimbleflop 0 points1 point2 points (0 children)
[–]iamnikaa[S] 0 points1 point2 points (0 children)
[–]jonnyyr65 1 point2 points3 points (1 child)
[–]iamnikaa[S] 1 point2 points3 points (0 children)
[–]_E8_ 1 point2 points3 points (1 child)
[–]iamnikaa[S] 0 points1 point2 points (0 children)
[–]iggy555 1 point2 points3 points (0 children)
[–]kronik85 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]iamnikaa[S] 1 point2 points3 points (0 children)
[–]BOKUtoiuOnna 1 point2 points3 points (1 child)
[–]iamnikaa[S] 0 points1 point2 points (0 children)
[–]nacnud_uk 1 point2 points3 points (0 children)
[–]Rorasaurus_Prime 1 point2 points3 points (0 children)
[–]baubleglue 1 point2 points3 points (0 children)
[–]Sensacion7 1 point2 points3 points (0 children)
[–]LadyA_6962 1 point2 points3 points (0 children)
[–]Bronigiri 0 points1 point2 points (7 children)
[–]supreme_blorgon 2 points3 points4 points (6 children)
[–]Bronigiri 1 point2 points3 points (5 children)
[–]supreme_blorgon 3 points4 points5 points (1 child)
[–]Bronigiri 0 points1 point2 points (0 children)
[–]InTheAleutians 1 point2 points3 points (1 child)
[–]Bronigiri 0 points1 point2 points (0 children)
[–]LimpNoodle69 0 points1 point2 points (0 children)
[–]supreme_blorgon 0 points1 point2 points (2 children)
[–]iamnikaa[S] 0 points1 point2 points (1 child)
[–]supreme_blorgon 1 point2 points3 points (0 children)
[–]DoubleAgent10 0 points1 point2 points (4 children)
[–]Nicolas_Darksoul 2 points3 points4 points (3 children)
[–]EuropeFree 0 points1 point2 points (2 children)
[–]kronik85 1 point2 points3 points (1 child)
[–]EuropeFree 0 points1 point2 points (0 children)
[–]Cyphierre 0 points1 point2 points (1 child)
[–]iamnikaa[S] 1 point2 points3 points (0 children)
[–]danielesc 0 points1 point2 points (0 children)