├── Smart Interviews Assignments.docx ├── Smart Interviews tips and tricks.docx ├── README.md ├── 001 print right angled triangle pattern.cpp ├── 003 Sum of array elements.cpp ├── 004 Rotation of matrix.cpp ├── LICENSE ├── Interview Puzzles.txt ├── 002 print hollow diamond pattern.cpp └── .gitignore /Smart Interviews Assignments.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FazeelUsmani/Smart-Interviews/HEAD/Smart Interviews Assignments.docx -------------------------------------------------------------------------------- /Smart Interviews tips and tricks.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/FazeelUsmani/Smart-Interviews/HEAD/Smart Interviews tips and tricks.docx -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Smart-Interviews 2 | This repository contains all the solved problems taught in Smart Interviews Data Structures and Algorithms course. Have a look at the 3 | website: https://smartinterviews.in/ 4 | 5 | Problems: https://www.hackerrank.com/contests/smart-interviews/challenges 6 | 7 | *Curated list of problems which can only be solved when you clearly understand the topic. Nice problemset!* 8 | 9 | 10 | 11 | **If you wish to take this course then I recommend to book 2 months in advance because there is a huge crowd coming these days** 12 | -------------------------------------------------------------------------------- /001 print right angled triangle pattern.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | using namespace std; 7 | 8 | int main() { 9 | 10 | int r, i,j,t,x=1; 11 | cin>>t; 12 | while(t--) 13 | { 14 | cin>>r; 15 | cout<<"Case #"< 2 | #include 3 | #include 4 | #include 5 | #include 6 | using namespace std; 7 | 8 | 9 | int main() { 10 | /* Enter your code here. Read input from STDIN. Print output to STDOUT */ 11 | //int t,i; 12 | long int n,t,i; 13 | cin>>t; 14 | while(t--) 15 | { 16 | cin>>n; 17 | long int sum = 0, a[n]; 18 | for(i=0;i>a[i]; 21 | } 22 | for(i=0;i 2 | #include 3 | #include 4 | #include 5 | #include 6 | using namespace std; 7 | void rot(int ar[][100], int r, int c) 8 | { 9 | 10 | for(int k=0;k=0; i--) 13 | { 14 | cout<>t; 25 | while(t--) 26 | { 27 | cin>>n; 28 | x++; 29 | int ar[100][100]; 30 | for(int i=0;i>ar[i][j]; 33 | cout<<"Test Case #"< 2 | #include 3 | #include 4 | #include 5 | #include 6 | using namespace std; 7 | 8 | 9 | int main() { 10 | int t,r,k,i,j,x=1,temp = 1; 11 | cin>>t; 12 | while(t--) 13 | { 14 | cin>>r; 15 | cout<<"Case #"<=1;k--) 55 | cout<<" "; 56 | //temp-=2; 57 | cout<<"*\n"; 58 | } 59 | } 60 | 61 | 62 | 63 | 64 | } 65 | return 0; 66 | } 67 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | MANIFEST 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *.cover 47 | .hypothesis/ 48 | .pytest_cache/ 49 | 50 | # Translations 51 | *.mo 52 | *.pot 53 | 54 | # Django stuff: 55 | *.log 56 | local_settings.py 57 | db.sqlite3 58 | 59 | # Flask stuff: 60 | instance/ 61 | .webassets-cache 62 | 63 | # Scrapy stuff: 64 | .scrapy 65 | 66 | # Sphinx documentation 67 | docs/_build/ 68 | 69 | # PyBuilder 70 | target/ 71 | 72 | # Jupyter Notebook 73 | .ipynb_checkpoints 74 | 75 | # pyenv 76 | .python-version 77 | 78 | # celery beat schedule file 79 | celerybeat-schedule 80 | 81 | # SageMath parsed files 82 | *.sage.py 83 | 84 | # Environments 85 | .env 86 | .venv 87 | env/ 88 | venv/ 89 | ENV/ 90 | env.bak/ 91 | venv.bak/ 92 | 93 | # Spyder project settings 94 | .spyderproject 95 | .spyproject 96 | 97 | # Rope project settings 98 | .ropeproject 99 | 100 | # mkdocs documentation 101 | /site 102 | 103 | # mypy 104 | .mypy_cache/ 105 | --------------------------------------------------------------------------------