Posts

Important Question

 Important Question 1. Kadene's Algorithm 2. Sum of largest circullar subarray (Apna college c++ 8.6) 3. Seive of Entjuaists 4. Given an integral number  N . The task is to find the count of digits present in this number. number of digits in N = log 10 (N) + 5. Given a number N, find an integer denoting the smallest number evenly divisible by each number from 1 to n. 6. Rearrange an array so that arr[i] becomes arr[arr[i]] with O(1) extra space 7. Find Peak element in Sorted Array 8. Quick sort 9. Merge sort 10. Minimum swap to short 11. Merge two sorted array in o(1) time --> VVVVIIIMPPP Matrix Questions: rotation of matrix, deternminaent, spiral traversal. search in row and column of sorted matrix(vvvvimp)(apna colllge c++ matrix practive questions) max recatnge(vvvvimp) 12. remainder with 7 vimp 13.   Check if strings are rotations of each other or not   14. convert to roman

time complexity

 Time Complexity Time Complexity of algorithm/code is  not  equal to the actual time required to execute a particular code but the number of times a statement executes. You will get surprising results i.e. for N = 10 you may get 0.5ms time and for N = 10, 000 you may get 0.2 ms time. Also, you will get different timings on the different machine. So, we can say that actual time requires to execute code is machine dependent (whether you are using pentium1 or pentiun5) and also it considers network load if your machine is in LAN/WAN. Even you will not get the same timings on the same machine for the same code, the reason behind that the current network load.  Now, the question arises if time complexity is not the actual time require executing the code then what is it?  The answer is :  Instead of measuring actual time required in executing each statement in the code, we consider how many times each statement execute.  How to Compare Algorithms? To compare...

bootstrap + font awesome link

 may not work on production level < link href = "http://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel = "stylesheet" > This will definatley work on production level   < script   src = "https://kit.fontawesome.com/64d58efce2.js"   crossorigin = "anonymous" ></ script >
Image
   Blog website in Django with database and Authentication system. I have created this blog using the python framework Django. In this website the I have used HTML, CSS, Javascript, and Bootstrap for the front-end and Django for the back-end. The SQLite database is used for storing posts, comments, contact forms, etc. This website has the following features Tiny MCE text editor is integrated into this website to write posts fastly. Comes with functionality that the comments are disabled for the users who are not login. Python Django Messagebox is used to show the status of requests. All the comments, replies, Posts are saved in the database. Templates are designed in such a way that they are showing the posts, comments, replies, etc. from the database in efficient way.  Database-based contact form. Fully Responsive Design. Secure and safe Authentication system(Login or Signup). Screenshots of projects. Visit Project on the Github: Click Here to view the project.  Adv...

A message to the soldiers using c++

 A message to the soldiers using c++ #include <iostream> #include <vector> #include <stack> #include <math.h> using   namespace   std ; char  ch =  'H' ;   void   j ( void )  {      cout<<endl;     cout<<endl;           for  ( int  i =  0 ; i <  8 ; i++) {           printf ( " " );           for  ( int  h =  0 ; h <  8 ; h++) {               if  (i <  1 ) {                   printf ( "%c" , ch);            ...

Printing pattern in c++

 Printing pattern in c++ #include <iostream> using   namespace   std ; int   patter_1 () {  //                         Logic              i-1         n-(i-1) // Pattern 1                  n=5         i     spaces      stars /*     *****                              1       0       ...