Code Problem / Data Structures and Algorithms / Linked Lists

Categories: Code Problem / Data Structures and Algorithms / Recursion (32) Code Problem / Data Structures and Algorithms / Binary Search (30) Code Problem / Data Structures and Algorithms / Linked Lists (26) Code Problem / Data Structures and Algorithms / Backtracking (26) Code Problem / Data Structures and Algorithms / Stacks and Queues (25) Code Problem / Data Structures and Algorithms / Hashing (24) Databases / SQL / Backup and Recovery (19) Code Problem / Data Structures and Algorithms / Arrays and Strings (19) Databases / SQL / Database Normalization (18) Code Problem / Data Structures and Algorithms / Time Complexity (17) Databases / SQL / Locking (16) Databases / SQL / Replication (15) Databases / SQL / SQL Queries (13) Code Problem / Data Structures and Algorithms / Graphs (13) Databases / SQL / Database Security (13)  More...

Recent solutions:

Check these solutions from our community:
Code Problem / Data Structures and Algorithms DifficultyMedium Python
This technical problem deals with removing duplicate elements from a linked list. Given an input list with duplicates, the goal is to produce an output list with all duplicates removed. An example input and output is provided.
About this solution: The candidate's solution correctly removes duplicates from a linked list. The approach is straightforward and easy to follow.
Nov 06
Code Problem / Data Structures and Algorithms Python
This problem asks whether a given singly linked list is a palindrome. A palindrome is a word, phrase, or sequence that reads the same backward as forward. In this case, the list is a palindrome if the elements in the list read the same forward as backward.
About this solution: The candidate's solution correctly checks if a singly linked list is a palindrome. The approach is to use a slow and fast pointer to find the middle of the list, reverse the second half of the list, and then compare the two halves. One potential improvement to the solution would be to use a stack to keep track of the first half of the list instead of reversing the second half. This would avoid having to reverse the second half of the list, which is unnecessary work.
Oct 23