[interviewDojo] #7: Find the middle element of a linked list

Hi,

Finding the middle element of a linked list is a simple problem that can be solved in linear time with a single pass of the list.

Problem

Given a linked list, find the middle element.

Example:

Input: 10 -> 2 -> 3
Output: 2

Input: 10 -> 2 -> 3 -> 5
Output: 2
Solution
Try to solve the problem by yourself and then go over our discussion and solution to learn more.


Interview coming up? Get in touch if you need personal coaching to ace your interview or if you need to practice with mock interviews with experienced engineers who work at the Big 4 tech companies. 

Feel free to forward this email to a friend so that they can subscribe here to receive these emails.
 
Copyright © 2020 Interview Dojo, All rights reserved.
You are receiving this email because you opted in via our website.

No more? .

Email Marketing Powered by Mailchimp

Older messages

[interviewDojo] #6: Linked Lists Boot Camp

Thursday, April 16, 2020

Hi, A linked list is a data structure that contains a sequence of nodes such that each node contains a value and a pointer to the next node. The first node is referred to as head and the last node is

[interviewDojo] #5: Find balanced string with minimum insertions and deletions

Tuesday, April 14, 2020

Hi, Today's practice problem is on strings. Problem Given a string of parenthesis, if the parenthesis are not balanced, then return the balanced string than can be produced with the minimum number

[interviewDojo] #4: Check if a tree is a Binary Search Tree

Sunday, April 12, 2020

Hi, Today's problem is a fundamental algorithm to practice traversing tree data structures. Problem Given a binary tree, write an efficient algorithm to validate that the tree is a Binary Search

[interviewDojo] #3: Binary Trees Boot Camp

Friday, April 10, 2020

Hi, Binary Trees are extremely common in interview questions. Today we review the basics and implement the two most important traversal algorithms: DFS (Depth First Search) and BFS (Breadth First

[interviewDojo] #1: Sorting Boot camp

Thursday, April 9, 2020

Hi! Today we discuss why sorting is important for algorithmic problem solving and we review the most important sorting algorithms. In the following days we will learn how to apply these techniques to

You Might Also Like

Software Testing Weekly - Issue 218

Friday, May 3, 2024

Unit, Integration and End-to-End Tests 🔧 View on the Web Archives ISSUE 218 May 4th 2024 COMMENT Welcome to the 218th issue! I loved going through this discussion among software engineers: What is your

gpt2-chatbot and OpenAI search engine - Weekly News Roundup - Issue #465

Friday, May 3, 2024

Plus: Med-Gemini; Vidu - Chinese answer to OpenAI's Sora; the first race of Abu Dhabi Autonomous Racing League; deepfaking celebrities to teach math and physics; and more! ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

NASA comes to the rescue of crowded rocket launch sites

Friday, May 3, 2024

Plus: Fisker's legal woes and Sprinklr lays off 100 View this email online in your browser By Christine Hall Friday, May 3, 2024 Good afternoon, and welcome to TechCrunch PM. We made it to Friday,

🎮 Forget the PS5 Pro, I Still Love My PS4 — The Best Lock Screen Widgets for iPhone

Friday, May 3, 2024

Also: Smart Home Mistakes to Avoid, and More! How-To Geek Logo May 3, 2024 Did You Know Half of the world's geysers are located in Yellowstone National Park. 🔑 More Passkeys Happy Friday! You can

JSK Daily for May 3, 2024

Friday, May 3, 2024

JSK Daily for May 3, 2024 View this email in your browser A community curated daily e-mail of JavaScript news The Power of React's Virtual DOM: A Comprehensive Explanation Modern JavaScript

Musk raises $6B for AI startup

Friday, May 3, 2024

Also, is TikTok dodging Apple's commissions? View this email online in your browser By Haje Jan Kamps Friday, May 3, 2024 Welcome to Startups Weekly — Haje's weekly recap of everything you can

SWLW #597: Seek first to understand, The "Iterative Adjacent Possible", and more.

Friday, May 3, 2024

Weekly articles & videos about people, culture and leadership: everything you need to design the org that makes the product. A weekly newsletter by Oren Ellenbogen with the best content I found

iOS Dev Weekly - Issue 659

Friday, May 3, 2024

Is Swift 6 hitting one of the REAL hard problems? Not generics, not data race safety, but naming things! 😬 View on the Web Archives ISSUE 659 May 3rd 2024 Comment Naming things is one of the two hard

Daily Coding Problem: Problem #1430 [Easy]

Friday, May 3, 2024

Daily Coding Problem Good morning! Here's your coding interview problem for today. This problem was asked by Facebook. You have a large array with most of the elements as zero. Use a more space-

Making sense of product management

Friday, May 3, 2024

​ Getting a sense of product sense Whenever I hear the term product sense, I think back to a Seinfeld episode about write-offs (with a little artistic license). Jerry: “You don't even know what