
- Main
- Catalog
- Computer science
- Coding interview preparation
Coding interview preparation
Preparing programmers for coding interviews. Addressing questions asked by major global programming companies. Cool programming resources.
Channel statistics
class Stack:
def __init__(self):
self.items = []
def push(self, item):
self.items.append(item)
def pop(self):
if not self.is_empty():
return self.items.pop()
raise IndexError("pop from empty stack")
def peek(self):
if not self.is_empty():
return self.items[-1]
raise IndexError("peek from empty stack")
def is_empty(self):
return len(self.items) == 0
# Example usage
stack = Stack()
stack.push(1)
stack.push(2)
print(stack.peek()) # Output: 2
print(stack.pop()) # Output: 2
print(stack.is_empty()) # Output: False
{}
▎Queues
A queue is a collection of elements that follows the First In, First Out (FIFO) principle. This means that the first element added to the queue is the first one to be removed.
▎Key Operations
1. Enqueue: Add an element to the back of the queue.
2. Dequeue: Remove the element from the front of the queue.
3. Front/Peek: Retrieve the front element without removing it.
4. IsEmpty: Check if the queue is empty.
▎Example Implementation in Python
class Queue:
def __init__(self):
self.items = []
def enqueue(self, item):
self.items.append(item)
def dequeue(self):
if not self.is_empty():
return self.items.pop(0)
raise IndexError("dequeue from empty queue")
def front(self):
if not self.is_empty():
return self.items[0]
raise IndexError("front from empty queue")
def is_empty(self):
return len(self.items) == 0
# Example usage
queue = Queue()
queue.enqueue(1)
queue.enqueue(2)
print(queue.front()) # Output: 1
print(queue.dequeue()) # Output: 1
print(queue.is_empty()) # Output: False
{}
▎Use Cases
• Stacks are commonly used in:
– Function call management (call stack).
– Undo mechanisms in applications.
– Syntax parsing (e.g., in compilers).
• Queues are commonly used in:
– Task scheduling (e.g., print jobs).
– Breadth-first search algorithms in graphs.
– Managing requests in web servers.
▎Conclusion
Stacks and queues are essential data structures that provide efficient ways to manage data based on specific access patterns. Understanding how to implement and utilize these structures can significantly improve your programming skills and problem-solving abilities.Responsive Design uses fluid grids and CSS media queries to flow content smoothly across any screen size. It’s a "one-size-fits-all" approach that scales proportionally. Adaptive Design uses static layouts that "snap" into place at specific breakpoints (e.g., 320px, 768px). The server detects the device and serves the specific layout built for it. Strategy: I prefer Responsive for most projects because it’s easier to maintain and better for SEO. I only use Adaptive for complex legacy sites where a total rebuild isn't possible but specific mobile optimization is required.❔ When should you use REST vs. GraphQL for an API? ✅ Answer:
REST is best for simple, resource-based applications where data structures are predictable. It uses standard HTTP methods and is easy to cache at the browser/CDN level. GraphQL is better for complex systems where a single page needs data from multiple sources. It prevents "Over-fetching" because the client requests exactly the fields it needs. Strategy: I choose REST for public APIs or stable microservices. I opt for GraphQL for frontend-heavy apps (like Social Media feeds) to reduce network round-trips and improve performance on slow mobile data.❔Why is Semantic HTML important for modern web apps? ✅ Answer:
Using tags like <main>, <article>, and <nav> instead of generic <div> tags provides immediate meaning to the browser and search engines. Impact: It’s critical for Accessibility (A11y), as screen readers use these tags to help visually impaired users navigate. It also boosts SEO because crawlers can easily identify the most important content on your page. Long-term: It results in cleaner, more maintainable code that is easier for teams to read and debug.❔How do you handle 'State Management' in a large React/Vue application? ✅ Answer:
I follow the "Lift state only as high as needed" rule. I keep UI-specific state (like a toggle) local to the component using useState. For Global State (user auth, themes), I use the Context API or a library like Redux/Zustand. This prevents "Prop Drilling," where data is passed through components that don't need it. Strategy: My goal is to keep the global store as "thin" as possible. Excessive global state causes unnecessary re-renders and makes the app harder to test and scale.❔What is a Progressive Web App (PWA) and why use one? ✅ Answer:
A PWA is a website that uses modern web capabilities (Service Workers, Manifest files) to provide an app-like experience directly in the browser. Core Benefits: It allows for Offline Functionality, push notifications, and "Add to Home Screen" without an App Store. It’s fast, secure (HTTPS only), and works on any device. Business Impact: PWAs drastically increase user retention and conversion rates, especially in areas with poor internet connectivity, by providing a reliable experience regardless of the network.
I approach this by first investigating the nature of the missingness. I categorize it into Missing Completely at Random (MCAR), Missing at Random (MAR), or Not at Random (MNAR), as the reason why data is missing dictates the solution. In the short term, I apply immediate cleaning techniques. If the missingness is negligible, I might use listwise deletion. If the data is critical, I use imputation methods, simple ones like mean/median for numerical data, or more advanced ones like K-Nearest Neighbors (KNN) or MICE for preserving the relationship between variables. Long term, I focus on root cause analysis. I work with data engineers to identify if the corruption is happening at the source (e.g., a broken sensor or a UI bug in a form). My goal is to implement validation checks at the data entry level to ensure the pipeline remains clean and reliable for future analysis.❔How do you distinguish between Correlation and Causation when analyzing a trend? ✅ Answer:
I start by acknowledging that correlation is only a mathematical relationship, while causation requires a functional mechanism. My first step is to use visualizations (like scatter plots) and coefficients (like Pearson’s) to confirm if a relationship actually exists. Next, I look for confounding variables and "Spurious Correlations." I use techniques like partial correlation or stratified analysis to see if a third factor is influencing both variables. For example, ice cream sales and shark attacks both rise in summer, but the "cause" is the temperature, not the ice cream. To truly prove causation, I would ideally advocate for a controlled experiment (A/B Testing). If an experiment isn't possible, I use quasi-experimental designs or "Causal Inference" models like Difference-in-Differences or Propensity Score Matching to estimate the causal impact using historical data.❔Walk me through your process for Exploratory Data Analysis (EDA) on a new dataset. ✅ Answer:
I begin with a structural audit. I check the shape of the data, data types, and the presence of duplicates. I generate summary statistics to get a sense of the "center" and "spread" of the data, which helps me spot obvious anomalies right away. Next, I move to Univariate and Bivariate analysis. I use histograms to check for skewness and box plots to identify outliers. I then use heatmaps and correlation matrices to see how variables interact with each other. This is where I start formulating hypotheses about which features might be the strongest drivers of our KPIs. Finally, I tie everything back to the Business Context. EDA isn't just about math; it’s about finding a story. I look for segments or trends that contradict our current business assumptions and prepare a summary that translates these technical observations into actionable questions for the product or marketing teams.❔A metric you are tracking suddenly drops by 20%. How do you investigate the cause? ✅ Answer:
I follow a "drilling down" methodology. First, I perform a Technical and Seasonal check. I verify with the engineering team if there were any deployment changes or tracking pixel failures. I also compare the drop against historical patterns is this a typical weekend dip or a holiday-related trend? Next, I segment the data. I break the 20% drop down by dimensions like geography, device type, browser, and user acquisition channel. If the drop is only happening on Android, it’s likely a technical bug. If it’s happening across all segments, it’s more likely a broader market shift or a competitor’s move. Finally, I look at the User Journey. I analyze the conversion funnel to see exactly where the drop-off is happening. Is it at the "Add to Cart" stage or the "Payment" stage? Once the bottleneck is identified, I present the data-backed reason for the decline along with a proposed fix or a further test to mitigate the loss.
SELECT department, COUNT(*)
FROM employees
GROUP BY department
HAVING COUNT(*) > 5;
🔗 3️⃣ Explain different types of JOINs
✅ Answer:
INNER JOIN → only matching records
LEFT JOIN → all left + matching right
RIGHT JOIN → all right + matching left
FULL JOIN → all records from both
👉 In analytics, LEFT JOIN is most used.
🧠 4️⃣ How do you find duplicate records in SQL?
✅ Answer:
SELECT column, COUNT(*)
FROM table
GROUP BY column
HAVING COUNT(*) > 1;
👉 Used for data cleaning.
📈 5️⃣ What are window functions?
✅ Answer:
“Window functions perform calculations across rows without reducing the number of rows. They are used for ranking, running totals, and comparisons.”
Example:
SELECT salary, RANK() OVER(ORDER BY salary DESC)
FROM employees;
📊 6️⃣ How do you handle missing data?
✅ Answer:
Remove rows (if small impact)
Replace with mean/median
Use default values
Use interpolation (advanced)
👉 Depends on business context.
📉 7️⃣ What is the difference between COUNT(*) and COUNT(column)?
✅ Answer:
COUNT(*) → counts all rows
COUNT(column) → ignores NULL values
📊 8️⃣ What is a KPI? Give example
✅ Answer:
“KPI (Key Performance Indicator) is a measurable value used to track performance.”
Examples: Revenue growth, Conversion rate, Customer retention
🧠 9️⃣ How would you find the 2nd highest salary?
✅ Answer:
SELECT MAX(salary)
FROM employees
WHERE salary < ( SELECT MAX(salary) FROM employees );
📊 🔟 Explain your dashboard project
✅ Strong Answer:
“I created a sales dashboard in Power BI where I analyzed revenue trends, top-performing products, and regional performance. I used DAX for calculations and added filters for better interactivity. This helped stakeholders identify key areas for growth.”
🔥 1️⃣1️⃣ What is normalization?
✅ Answer:
“Normalization is the process of organizing data to reduce redundancy and improve data integrity.”
📊 1️⃣2️⃣ Difference between INNER JOIN and LEFT JOIN?
✅ Answer:
INNER JOIN → only matching data
LEFT JOIN → keeps all left table data
👉 LEFT JOIN is preferred in analytics.
🧠 1️⃣3️⃣ What is a CTE?
✅ Answer:
“A CTE (Common Table Expression) is a temporary result set defined using WITH clause to improve readability.”
📈 1️⃣4️⃣ How do you explain insights to non-technical people?
✅ Answer:
“I focus on storytelling. Instead of technical terms, I explain insights in simple business language with visuals and examples.”
📊 1️⃣5️⃣ What tools have you used?
✅ Answer:
SQL, Excel, Power BI, Python (basic/advanced depending on you)
💼 1️⃣6️⃣ Behavioral Question: Tell me about a challenge
✅ Answer:
“While working on a dataset, I found inconsistencies in data. I cleaned and standardized it using SQL and Excel, ensuring accurate analysis. This improved the dashboard reliability.”
📊 1️⃣7️⃣ How do you prioritize multiple data requests?
✅ Answer:
"I prioritize based on business impact, urgency, and the deadline. I communicate with stakeholders to understand which insights are needed for immediate decision-making and manage my timeline accordingly."I would explain that I prioritize data over ego. First, I would invite the teammate to a private discussion to fully understand their perspective and the technical trade-offs they are considering. I would avoid "right vs. wrong" and instead focus on "which solution better meets the project requirements." Next, I would suggest a small proof-of-concept (PoC) or a benchmark for both approaches if the data isn't clear. If we still can't agree, I would escalate it to a Lead/Architect for a final decision to avoid stalling the project. Finally, once a decision is made, I practice "disagree and commit"—meaning I support the chosen path 100%, even if it wasn't my original idea, to ensure the team remains unified.❔How do you handle a situation where you realize you won't be able to meet a deadline? ✅ Answer:
I believe in "radical transparency." As soon as I realize a deadline is at risk, not the day of, but as early as possible I would notify my manager or the project owner. I would provide a clear explanation of the blockers and a realistic updated estimate. Next, I would propose a "Scope Cut" or an MVP (Minimum Viable Product) approach. I would identify which features are "must-haves" and which can be deferred to a later sprint, allowing us to still deliver value on the original date. Long term, I would conduct a personal post-mortem to see if the delay was due to underestimation, scope creep, or technical debt, and I would adjust my planning process for future sprints to prevent a recurrence.❔How do you explain complex technical concepts to non-technical stakeholders? ✅ Answer:
I approach this by removing jargon and using analogies. I start by identifying the "Business Value" rather than the "Implementation Detail." Instead of explaining a "Load Balancer," I might compare it to a receptionist directing people to the shortest line in a bank. Next, I focus on the impact of the technical decision. I explain how a specific technology or bug affects the user experience, the budget, or the timeline. I use visual aids or diagrams whenever possible, as they are often more effective than verbal explanations for abstract concepts. Ultimately, I keep the door open for questions. I pause frequently to check for understanding, ensuring the stakeholder feels comfortable enough to ask for clarification without feeling overwhelmed by technical depth.❔Tell me about a time you made a major mistake at work. How did you handle it? ✅ Answer:
My first priority would be "Damage Control." I would immediately admit the mistake to my team and work to revert the change or deploy a hotfix to minimize the impact on users. Owning the mistake early prevents the team from wasting time "hunting" for the cause. Once the system is stable, I would communicate with any affected stakeholders to explain what happened and what was done to fix it, maintaining a focus on accountability rather than making excuses. Finally, I would advocate for a "Blameless Post-mortem." I would look at the process and not the person and suggest improvements like better unit tests, automated CI/CD checks, or peer review requirements to ensure that same mistake is impossible for anyone to make again.
Reviews channel
13 total reviews
- Added: Newest first
- Added: Oldest first
- Rating: High to low
- Rating: Low to high
Catalog of Telegram Channels for Native Placements
Coding interview preparation is a Telegram channel in the category «Интернет технологии», offering effective formats for placing advertising posts on TG. The channel has 5.8K subscribers and provides quality content. The advertising posts on the channel help brands attract audience attention and increase reach. The channel's rating is 30.8, with 13 reviews and an average score of 5.0.
You can launch an advertising campaign through the Telega.in service, choosing a convenient format for placement. The Platform provides transparent cooperation conditions and offers detailed analytics. The placement cost is 7.8 ₽, and with 32 completed requests, the channel has established itself as a reliable partner for advertising on Telegram. Place integrations today and attract new clients!
You will be able to add channels from the catalog to the cart again.
Комментарий