All Questions
Tagged with interview-questions python-3.x
38 questions
3
votes
1
answer
1k
views
Small shopping cart application - Solid Principles and Clean Code
I've recently had a technical interview where I had to identify code smells and refactor an existing code by applying the SOLID principles and implementing unit tests.
It is a small shopping cart ...
2
votes
1
answer
340
views
Design Tic Tac Toe Interview Problem [Python 3]
Practicing objected oriented design. This time, it's designing the TicTacToe game. One difference between the real TicTacToe game is that I've made my TicTacToe game to have variable sized board.
...
4
votes
1
answer
2k
views
Design Shopping Cart System Interview Problem [Python 3]
Just practicing some objected oriented design questions. Please let me know what can be improved to be more OOD and extensible. Thank you.
Functional Requirements
Cart can hold multiple products
A ...
2
votes
1
answer
1k
views
Parse a log file into separate column files
This is a follow-up to https://stackoverflow.com/questions/71194832/converting-json-based-log-into-column-format-i-e-one-file-per-column .
My task is to optimize this code whose function is to convert ...
4
votes
1
answer
201
views
Return the biggest loss a client made from prices list
A hiring company gave me the following challenge:
We want a function which accepts a very large list of prices (pricesLst) and returns the largest possible loss a ...
1
vote
2
answers
1k
views
Interview: Drug Analyzer class
the introduction is this:
You are a member of a biotechnology programming team that is responsible for creating a system for lab technicians, which will assist them with drug analysis.
Your goal is ...
3
votes
1
answer
89
views
Simple command line API client for getting quotes
Was given a take-home test as part of a job interview, which I failed due to a supposed lack of tests, logging, error handling and packaging. But I did touch upon all of these.. suggested time spent ...
3
votes
1
answer
186
views
Find minimal modulo-sum of pairs from two lists
Recently I appeared for an job challenge organised on HackerEarth.
Question:
There are two teams T1 and T2. Power of each player is represented in array. The rules of game are as follow.
There are ...
3
votes
2
answers
1k
views
Find longest Palindromic substring
technical interview question i got from daily interview pro
A palindrome is a sequence of characters that reads the same backwards and forwards. Given a string, s, find the longest palindromic ...
2
votes
1
answer
98
views
Is there a route to the end of the jump table?
I'm currently learning about Dynamic Programming and solving a "coding question" related to the topic.
Given an array of non-negative integers, you are initially positioned
at the first ...
13
votes
3
answers
5k
views
Converting Roman numerals to integers
Roman numerals are represented by seven different symbols: I, V, X, L,
C, D and M.
...
4
votes
2
answers
366
views
Query and display train and station information
Recently got this coding assignment as the first round of interview at a tech organization. I could get the expected result, however, my code failed the best practices check.
Please let me know if it ...
3
votes
1
answer
366
views
Find the smallest number of perfect squares that sum to a target
Given a positive integer n, find the smallest number of perfect squares (for example, 1, 4, 9, 16, ...) that sum to n.
...
1
vote
2
answers
818
views
Unit tests for anagram finder
I did this test for a job and the feedback was:
"while many were added to test private methods, they did not do anything to ensure the public interface worked correctly, edge cases were missed"
But ...
6
votes
4
answers
321
views
LeetCode ZigZag helper function code
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)
...