Skip to content

Geeky Codes

Programming, AI, Machine Learning & Software Development Tutorials

  • Home
  • Python
  • Machine Learning
  • Data Science
  • Interview Questions
  • Data Structures and Algorithms
  • Interview
  • Machine Learning From Scratch

Category: Data Structures and Algorithms

DSA (Data Structures and Algorithms) is the study of organizing data efficiently using data structures like arrays, stacks, and trees, paired with step-by-step procedures (or algorithms) to solve problems effectively.

Inverting a Character Frequency Map in Python
Data Structures and AlgorithmsInterviewInterview QuestionsPython

Inverting a Character Frequency Map in Python

Geeky CodesJune 13, 2026June 13, 2026

Problem Statement Given a string containing lowercase English letters, compute the frequency of each character and then invert the mapping…

Data Structures and AlgorithmsInterviewInterview QuestionsPython

Optimized Python Implementation for Chen Primes

Geeky CodesJune 8, 2026June 8, 2026

Prime numbers have fascinated mathematicians for centuries. Among the many special categories of primes, Chen Primes occupy an interesting place…

Unique Strings with Odd and Even Swapping Allowed
AlgorithmsData Structures and AlgorithmsInterviewInterview QuestionsPython

Unique Strings with Odd and Even Swapping Allowed

July 4, 2025July 4, 2025

Introduction: In string manipulation, discovering unique strings amidst a sea of possibilities can be both challenging and rewarding. In this…

Data Structures and AlgorithmsHacker Rank SolutionsPython

Beautiful Days at the Movies | Hackerrank Solutions

July 2, 2025July 2, 2025

Lily likes to play games with integers. She has created a new game where she determines the difference between a…

AlgorithmsData Structures and AlgorithmsPython

Letter Combinations of a phone number

Geeky CodesAugust 27, 2024February 6, 2025

Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any…

Data Structures and AlgorithmsPython

3 Sum Closest | LeetCode

Geeky CodesAugust 27, 2024February 6, 2025

Given an integer array nums of length n and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of…

Finding the Top K Most Frequent Elements in an Array
Data Structures and AlgorithmsInterviewInterview QuestionsPython

Finding the Top K Most Frequent Elements in an Array

Geeky CodesJune 18, 2024February 6, 2025

Finding the top ( k ) most frequent elements in an array is a common question in coding interviews and…

Data Structures and AlgorithmsInterviewInterview QuestionsPython

Finding the Top K Largest Elements in an Array

Geeky CodesJune 18, 2024February 6, 2025

In many coding interviews and real-world applications, finding the top ( k ) largest elements in an array is a…

Counting Odd and Even Occurrences in an Array
AlgorithmsData Structures and AlgorithmsInterviewInterview QuestionsPython

Counting Odd and Even Occurrences in an Array

Geeky CodesApril 18, 2024February 7, 2025

Introduction: In programming, it’s common to encounter scenarios where you need to count the number of elements occurring an odd…

How to Check if a Number is Prime in Python
AlgorithmsData Structures and AlgorithmsInterviewInterview QuestionsPython

How to Check if a Number is Prime in Python

April 18, 2024February 8, 2025

Introduction:Prime numbers are natural numbers greater than 1 that have no positive divisors other than 1 and themselves. Determining whether…

Deleting Nodes with Greater Values on the Right Side in a Linked List
AlgorithmsData Structures and AlgorithmsInterviewInterview QuestionsPython

Deleting Nodes with Greater Values on the Right Side in a Linked List

April 16, 2024July 4, 2025

Introduction:In programming, efficiently managing linked lists is a crucial skill. Deleting nodes with greater values on the right side is…

Finding Maximum Difference Type in an Array
AlgorithmsData Structures and AlgorithmsInterviewInterview QuestionsPython

Finding Maximum Difference Type in an Array

April 16, 2024July 4, 2025

Introduction:Discovering the maximum difference between elements in a Python array is a crucial programming task, often demanding efficient algorithms for…

Sorting Unique Integers Without Built-in Functions in Python
AlgorithmsData Structures and AlgorithmsInterviewInterview Questions

Sorting Unique Integers Without Built-in Functions in Python

April 14, 2024July 4, 2025

Introduction:Sorting a list of unique integers is a common task in programming, often requiring efficient algorithms to achieve the desired…

Character Frequency Counting in Strings
AlgorithmsData Structures and AlgorithmsInterviewInterview QuestionsPython

Character Frequency Counting in Strings

April 14, 2024July 4, 2025

Introduction: Character frequency counting is a common task in string manipulation, often encountered in various programming scenarios. In this tutorial,…

String Operations: Efficiently Reverse Substrings
AlgorithmsData Structures and AlgorithmsInterviewInterview QuestionsPython

String Operations: Efficiently Reverse Substrings

April 14, 2024July 4, 2025

Introduction: String manipulation is a fundamental aspect of programming, and understanding efficient techniques for performing string operations is essential. In…

Square Root Integral in Python
AlgorithmsData Structures and AlgorithmsInterviewInterview QuestionsPython

Square Root Integral in Python

April 14, 2024July 4, 2025

Given a number N, find its square root. You need to find and print only the integral part of square…

Word Patterns | Interview Question at Mastercard
AlgorithmsData Structures and AlgorithmsInterviewInterview QuestionsJAVAPython

Word Patterns | Interview Question at Mastercard

April 14, 2024July 4, 2025

Introduction: In the world of string manipulation, unraveling patterns and matching sequences play a pivotal role in various applications. In…

Minimum Steps to Reduce a Number to 1 Using Dynamic Programming
AlgorithmsData Structures and AlgorithmsInterview QuestionsPython

Minimum Steps to Reduce a Number to 1 Using Dynamic Programming

April 13, 2024July 3, 2025

Problem Statement: Given a positive integer ‘N’, our objective is to compute and return the minimum number of steps needed…

Find Kth Number Program in Python
Data Structures and AlgorithmsPython

Find Kth Number Program in Python

Geeky CodesMarch 17, 2024July 2, 2025

Introduction: The task at hand is to implement a Python function that finds the kth lexicographically smallest integer in the…

Data Structures and AlgorithmsHacker Rank SolutionsPython

Utopian Tree | Hackerrank Solution

Geeky CodesFebruary 22, 2024July 1, 2025

The Utopian Tree goes through 2 cycles of growth every year. Each spring, it doubles in height. Each summer, its height increases by 1 meter. A…

Posts navigation

Older posts

Total Visitors

  • 49,585 hits
  • Longest Consecutive Sequence in Python: O(n) Hash Set Solution Explained
  • PyTorch CNN Shape Mismatch Error: Fixing “mat1 and mat2 shapes cannot be multiplied
  • Counting Common Members Across Months in SQL
  • How to Join a Parameterized View in SAP HANA (And Fix the “Parameterized View with Unused Parameter” Error)
  • Inverting a Character Frequency Map in Python

Top Posts & Pages

  • Longest Consecutive Sequence in Python: O(n) Hash Set Solution Explained
  • PyTorch CNN Shape Mismatch Error: Fixing "mat1 and mat2 shapes cannot be multiplied
  • Counting Common Members Across Months in SQL
  • How to Join a Parameterized View in SAP HANA (And Fix the "Parameterized View with Unused Parameter" Error)
  • Terms and Conditions
  • Inverting a Character Frequency Map in Python
  • Ace Your Databricks Data Engineer Exam: 10 Essential Practice Questions Explained Part 6
  • Ace Your Databricks Data Engineer Exam: 10 Essential Practice Questions Explained Part 5
  • Ace Your Databricks Data Engineer Exam: 10 Essential Practice Questions Explained Part 4
  • Ace Your Databricks Data Engineer Exam: 10 Essential Practice Questions Explained Part 3
Read more: Utopian Tree | Hackerrank Solution

| Extensive News by Ascendoor | Powered by
Geeky Codes
Proudly powered by WordPress Theme: Extensive News.

Loading Comments...