Welcome to my Problem Solving repository! In this repository, you'll find a collection of problems I've solved using various programming languages. Each problem has its own folder containing the problem statement, input/output samples, and my solution.
This repository serves as a showcase of my problem-solving skills. I'm passionate about honing my algorithmic thinking and coding abilities, and I enjoy tackling challenges from different domains. You'll find problems ranging from data structures and algorithms to real-world coding challenges.
I believe in being versatile, which is why I've solved problems using various programming languages, including but not limited to:
I enjoy exploring the nuances of different languages and adapting my solutions accordingly.
The repository is organized into folders, with each folder corresponding to a specific problem. Here's a typical structure:
HackerRank
├── hackerRank
| ├── algorithms
| | ├── warmup
| | | ├── a_very_big_sum [Easy] [Python]
| | | ├── compare_the_triplets [Easy] [Python]
| | | ├── mini_max_sum [Easy] [Python]
| | | ├── plus_minus [Easy] [Python]
| | | ├── simple_array_sum [Easy] [Python]
| | | ├── solve_me_first [Easy] [Python]
| | | ├── staircase [Easy] [Python]
| ├── SQL
| | ├── advancedSelect
| | | ├── type_of_triangle [Easy] [SQL]
| | | ├── the _pads [Medium] [SQL]
| | | ├── occupations [Medium] [SQL]
| | | ├── binary_tree_nodes [Medium] [SQL]
| | | ├── new_companies [Medium] [SQL]
| | ├── aggregation
| | | ├── average_population [Easy] [SQL]
| | | ├── japan_population [Easy] [SQL]
| | | ├── population_density_difference [Easy] [SQL]
| | | ├── revising_aggregations_the_count_function [Easy] [SQL]
| | | ├── revising_aggregations_the_sum_function [Easy] [SQL]
| | | ├── revising_aggregation_averages [Easy] [SQL]
| | | ├── the_blunder [Easy] [SQL]
| | | ├── top_earners [Easy] [SQL]
| | | ├── weather_observation_station_2 [Easy] [SQL]
| | | ├── weather_observation_station_13 [Easy] [SQL]
| | | ├── weather_observation_station_14 [Easy] [SQL]
| | | ├── weather_observation_station_15 [Easy] [SQL]
| | | ├── weather_observation_station_16 [Easy] [SQL]
| | | ├── weather_observation_station_17 [Easy] [SQL]
| | | ├── weather_observation_station_18 [Medium] [SQL]
| | | ├── weather_observation_station_19 [Medium] [SQL]
| | | ├── weather_observation_station_20 [Medium] [SQL]
| | ├── basicJoin
| | | ├── the_reporter [Medium] [SQL]
| | | ├── top_competitors [Medium] [SQL]
| | ├── basicSelect
| | | ├── employee_names [Easy] [SQL]
| | | ├── employee_salaries [Easy] [SQL]
| | | ├── higher_than_75_marks [Easy] [SQL]
| | | ├── revising_the_select_query_i [Easy] [SQL]
| | | ├── revising_the_select_query_ii [Easy] [SQL]
| | | ├── select_all [Easy] [SQL]
| | | ├── select_by_id [Easy] [SQL]
| | | ├── japanese_cities_attributes [Easy] [SQL]
| | | ├── japanese_cities_names [Easy] [SQL]
| | | ├── weather_observation_station_1 [Easy] [SQL]
| | | ├── weather_observation_station_3 [Easy] [SQL]
| | | ├── weather_observation_station_4 [Easy] [SQL]
| | | ├── weather_observation_station_5 [Easy] [SQL]
| | | ├── weather_observation_station_6 [Easy] [SQL]
| | | ├── weather_observation_station_7 [Easy] [SQL]
| | | ├── weather_observation_station_8 [Easy] [SQL]
| | | ├── weather_observation_station_9 [Easy] [SQL]
| | | ├── weather_observation_station_10 [Easy] [SQL]
| | | ├── weather_observation_station_11 [Easy] [SQL]
| | | ├── weather_observation_station_12 [Easy] [SQL]
LeetCode
├── leetCode
| ├── p_0001_two_sum [Easy] [Python]
| ├── p_0009_palindrome_number [Easy] [Python]
| ├── p_0020_valid_parentheses [Easy] [Python, Java]
| ├── p_0175_combine_two_tables [Easy] [SQL]
| ├── p_0176_second_highest_salary [Medium] [SQL]
| ├── p_0180_consecutive_numbers [Medium] [SQL]
| ├── p_0181_employees_earning_more_than_their_managers [Easy] [SQL, Pandas]
| ├── p_0182_duplicate_emails [Easy] [SQL, Pandas]
| ├── p_0183_customers_who_never_order [Easy] [SQL, Pandas]
| ├── p_0184_department_highest_salary [Medium] [SQL]
| ├── p_0185_department_top_three_salaries [Hard] [SQL]
| ├── p_0196_delete_duplicated_emails [Easy] [SQL, Pandas]
| ├── p_0197_rising_temperature [Easy] [SQL]
| ├── p_0511_game_play_analysis_i [Easy] [SQL, Pandas]
| ├── p_0550_game_play_analysis_iv [Medium] [SQL]
| ├── p_0570_managers_with_at_least_5_direct_reports [Medium] [SQL]
| ├── p_0577_employee_bonus [Easy] [SQL]
| ├── p_0584_find_customer_referee [Easy] [SQL]
| ├── p_0585_investments_in_2016 [Medium] [SQL]
| ├── p_0586_custoemr_placing_the_largest_number_of_orders [Easy] [SQL, Pandas]
| ├── p_0595_big_countries [Easy] [SQL, Pandas]
| ├── p_0596_classess_more_than_5_strudent [Easy] [SQL, Pandas]
| ├── p_0602_friend_requests_ii_who_has_the_most_friends [Medium] [SQL]
| ├── p_0607_sales_person [Easy] [SQL, Pandas]
| ├── p_0610_triangle_judgement [Easy] [SQL]
| ├── p_0619_biggest_single_number [Easy] [SQL, Pandas]
| ├── p_0620_not_boring_movies [Easy] [SQL, Pandas]
| ├── p_0627_swap_salary [Easy] [SQL]
| ├── p_0626_exchange_seats [Medium] [SQL]
| ├── p_1045_customers_who_bought_all_products [Medium] [SQL]
| ├── p_1050_actors_and_directors _who_cooperated_at_least_three_times [Easy] [SQL, Pandas]
| ├── p_1068_product_sales_analysis_i [Easy] [SQL, Pandas]
| ├── p_1070_product_sales_analysis_iii [Medium] [SQL]
| ├── p_1075_project_employees_i [Easy] [SQL]
| ├── p_1084_sales_analysis_iii [Easy] [SQL, Pandas]
| ├── p_1141_user_activity_for_the_past_30_days i [Easy] [SQL]
| ├── p_1148_article_view_i [Easy] [SQL, Pandas]
| ├── p_1164_product_price_at_a_given_date [Medium] [SQL]
| ├── p_1173_immediate_food_delivery_i [Easy] [SQL]
| ├── p_1174_immediate_food_delivery_ii [Medium] [SQL]
| ├── p_1179_reformat_department_table [Easy] [SQL]
| ├── p_1193_monthly_transaction_i [Medium] [SQL]
| ├── p_1204_last_person_to_fit_in_the_bus [Medium] [SQL]
| ├── p_1211_queries_quality_and_percentage [Easy] [SQL]
| ├── p_1251_average_selling_price [Easy] [SQL]
| ├── p_1280_students_and_examinations [Easy] [SQL, Pandas]
| ├── p_1321_restaurant_growth [Medium] [SQL]
| ├── p_1327_list_the_products_ordered_in_a_period [Easy] [SQL]
| ├── p_1341_movie_rating [Medium] [SQL]
| ├── p_1378_replace_employee_iD_with_the_unique_identifier [Easy] [SQL, Pandas]
| ├── p_1407_top_travellers [Easy] [SQL]
| ├── p_1484_group_sold_products_by_the_date [Easy] [SQL]
| ├── p_1517_find_users_with_valid_e_mails [Easy] [SQL]
| ├── p_1527_patients_with_a_condtion [Easy] [SQL]
| ├── p_1581_customer_who_visited_but_did_not_make_any_transaction [Easy] [SQL]
| ├── p_1587_bank_account_summary_ii [Easy] [SQL]
| ├── p_1633_percentage_of_users_attended_a_contest [Easy] [SQL]
| ├── p_1661_average_time_of_process_per_machine [Easy] [SQL]
| ├── p_1667_fix_names_in_a_table [Easy] [SQL]
| ├── p_1683_invalid_tweets [Easy] [SQL]
| ├── p_1693_daily_leads_and_partners [Easy] [SQL]
| ├── p_1729_find_followers_count [Easy] [SQL]
| ├── p_1731_the_number_of_employees_which_report_to_each_employee [Easy] [SQL]
| ├── p_1741_find_total_time_spent_by_each_employee [Easy] [SQL]
| ├── p_1757_recyclable_and_low_fat_products [Easy] [SQL]
| ├── p_1789_primary_department_for_each_employee [Easy] [SQL]
| ├── p_1795_rearrance_products_table [Easy] [SQL]
| ├── p_1873_calculate_special_bonus [Easy] [SQL]
| ├── p_1890_the_latest_login_in_2020 [Easy] [SQL]
| ├── p_1907_count_salary_categories [Medium] [SQL]
| ├── p_1934_confirmation_rate [Medium] [SQL]
| ├── p_1965_employees_with_missing_information [Easy] [SQL]
| ├── p_1978_employees_whose_manager_left_the_company [Easy] [SQL]
| ├── p_2082_the_number_of_rich_customers [Easy] [SQL]
| ├── p_2356_number_of_unique_subjects_taught_by_each_teacher [Easy] [SQL]
| ├── p_2877_create_a_dataframe_from_list [Easy] [Pandas]
| ├── p_2878_get_the_size_of_dataframe [Easy] [Pandas]
| ├── p_2879_display_the_first_three_rows [Easy] [Pandas]
| ├── p_2880_select_data [Easy] [Pandas]
| ├── p_2881_create_a_new_column [Easy] [Pandas]
| ├── p_2882_drop_duplicate_rows [Easy] [Pandas]
| ├── p_2883_drop_missing_data [Easy] [Pandas]
| ├── p_2884_modify_columns [Easy] [Pandas]
| ├── p_2885_renamne_columns [Easy] [Pandas]
| ├── p_2886_change_data_type [Easy] [Pandas]
| ├── p_2887_fill_missing_data [Easy] [Pandas]
└── ...
Topic | Problem |
---|---|
GROUP_CONCAT | leetCode [1484] |
REGEXP | leetCode [1517], hackerrank [weather_observation_station_6] |
ROW_NUMBER / OVER Cluase | leetCode [1174], hackerrank [advancedSelect->Occupations] |
LAG / LEAD | leetCode [180, 626] |
FIRST_VALUE | leetCode [1164] |
COALESCE | leetCode [1164] |
OVER | leetCode [1204, 1321] |
Weighted_sum "Calculation of moving average" | leetCode [1204, 1321] |
UNION | leetCode [602, 1341, 1907] |
FIRST_VALUE | leetCode [1341] |
DENSE_RANK | leetCode [184, 185] |
Special Filter Condition | leetCode [585] |
Convert columns to rows using UNION | leetCode [1795] |
RIGHT/SUBSTR | hackerrank [weather_observation_station_7] |
Pivot Table | hackerrank [advancedSelect->Occupations] |
Median Calculation | hackerrank [aggregation -> weather_observation_station_20] |
Join on Condition | hackerrank [basicJoin -> the_reporter] |
While this repository primarily showcases my own solutions, I'm open to collaboration and learning from others. If you have a more optimal solution to any of the problems or want to add problems from different domains, feel free to open a pull request. Constructive feedback is always welcome!
This repository is licensed under the MIT License, which means you're free to use the code here for your own learning and projects. However, please note that the problem statements themselves might have their own usage terms.
Thank you for visiting my Problem Solving repository! Feel free to explore the problems and solutions. If you find something helpful or have questions, don't hesitate to reach out.
Happy coding! 🚀