{"id":15797754,"url":"https://github.com/parvez3019/python-programming-problems","last_synced_at":"2025-03-31T19:44:45.052Z","repository":{"id":100405200,"uuid":"50289895","full_name":"parvez3019/python-programming-problems","owner":"parvez3019","description":"python-programming-problems","archived":false,"fork":false,"pushed_at":"2016-01-24T15:08:44.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-12T00:41:09.269Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/parvez3019.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-24T13:54:56.000Z","updated_at":"2016-02-26T12:19:33.000Z","dependencies_parsed_at":"2023-04-19T17:00:52.682Z","dependency_job_id":null,"html_url":"https://github.com/parvez3019/python-programming-problems","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parvez3019%2Fpython-programming-problems","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parvez3019%2Fpython-programming-problems/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parvez3019%2Fpython-programming-problems/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/parvez3019%2Fpython-programming-problems/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/parvez3019","download_url":"https://codeload.github.com/parvez3019/python-programming-problems/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246531986,"owners_count":20792735,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-05T00:20:28.229Z","updated_at":"2025-03-31T19:44:45.012Z","avatar_url":"https://github.com/parvez3019.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# python-programming-problems\npython-programming-problems\n\nProblem 1:\n=======\n\nLets assume we have two sorted arrays of integers, as following:\n\narray `a` has m elements\narray `b` has n elements\n\nsize of array `a` is m+n, hence `a` can accomodate all the elements that are there in array `b` as well as its own.\n\nnow you need to write a code so that the elements from array `b` are copied into array `a`, keeping its orignal property maintained which is; it has been sorted.\n\neaxmple:\n\na = [1,20,31,45,50,........]\nb = [10,12,17,70]\n\nafter operation\n\na = [1,10,12,17,20,31,45,50,70]\n\nkindly try to optimize the code so that it can run faster, list/mention any bottlenecks if you find which might be hindering the performance.\n\n\nProblem 2:\n=======\n\nLet assume we have a 2D-array/Matrix of unique integers with the following property.\n\n1. Elements in columns are sorted from top to bottom.\n2. Elements in rows are sorted from left to right.\n\nWe need to perform a simple operation `delete` by keep the property of the Matrix maintained so that algoritm can run consistently after consecutive operations on the matrix.\n\n`delete` operation: should take a key `k`(integer) which is has to be lookedup into the Matrix and if found should be deleted (so that on next run, it can be lookedup again) else report the user with a error message telling \"This key doesn't exists.\".\n\nexample:\n\na = [ [1, 13, 21, 56, 70],\n        [3, 15, 25, 60, 73],\n\t[5, 18, 30, 63, 75],\n\t[9, 20, 35, 69, 88] ]\n\noperation 1: delete 27\nresult: \"This key doesn't exists.\"\n\noperation 2: delete 63\nresult: \"Key deleted.\"\n\noperation 3: delete 63\nresult: \"This key doesn't exists.\"\n\nTry to develop an optimized code, with minium time complexity possible.\n\nProblem 3:\n=======\n\nDevelop a simple program which can simualte a simple `tree` with add, delete and update operation, also you need to store the tree on disk so that next time when the program loads it restores to the tree to the previous state.\n\n\nProblem 4:\n=======\n\nIn java and many ther High level languages by default strings are immutable(non-changeable) give a critical reasoning that why desginers of java and other such languages choose to handle string in this manner over the way its predecessors use to handle strings.\n\nIf you think its rather a wrong methodology then please support your agrument.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparvez3019%2Fpython-programming-problems","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparvez3019%2Fpython-programming-problems","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparvez3019%2Fpython-programming-problems/lists"}