Common questions being ask during an interview with an answers in Python. The logical solutions is applied to all languages.
All questions is not in order of the difficulty level. I didn't sort in any way. Just some random question from my experiences that I can remember.
-
Find a missing number in an array .The question is straight forward. Find a missing number in an array which can be solved using simple arithmetic formula. https://github.com/izzatz/Python-Interview-Questions/blob/master/find_missing_number_array.py
-
Find one or more missing number in an array. But the pre defined array list must be in sequence. https://github.com/izzatz/Python-Interview-Questions/blob/master/find_one_or_more_missing_number_array.py
-
Given two variables value. Swap the two value. The solution is by creating a 3rd variable. https://github.com/izzatz/Python-Interview-Questions/blob/master/swap_two_values.py
-
Palindrome question. Verify a given string whether it was a valid palindrome or not. https://github.com/izzatz/Python-Interview-Questions/blob/master/palindrome.py
-
Sort number in an array. Number in array could be positive and negative. Sort the number accordingly. https://github.com/izzatz/Python-Interview-Questions/blob/master/sort_number_array.py
-
Create n number of folders. Folder name should be unique. Solution use a incremental number at the end of the filename. https://github.com/izzatz/Python-Interview-Questions/blob/master/create_n_folders.py