Interview Question for Linked List DSA

 

All the code is commented, to view the logic of a particular block or a program, then uncomment that block.
'''
< Code >
'''
For view the file with online python3 compiler click on - View Code


View Code

Basic Technical Interview Codding Questions and Solution in Python


All the code is commented, to view the logic of a particular block or a program, then uncomment that block.
'''
< Code >
'''
For view the file with online python3 compiler click on - View Code


View Code

Online Compilers

 C Compiler            Cpp compiler             C# compiler

  


 Python compiler         HTML CSS JS compiler         Ruby Compiler


Program to check - How Old are You




Download apk file of this program from here 
 ( c4droid is required to install )




DIRECT RUN FROM HERE

How to use Code Block


How to Download / Install Code Block ( in 3 steps )

  1. Download from here    :    filehippo  or  mydrive
  2. Install  setup ( yes > next > I Agree > next > install )
  3. click - Yes, associate Code::Block with every supported type 

How to create / run C program in Code Block ( in 5 steps )

  1. open Code Block
  2. file > new > empty file  / ctrl-shift-N
  3. save as  .c file type
  4. Compile ( Build >compile  / ctrl-shift-F9 )
  5. Run ( Build > run / ctrl-F10)
 ----------------------------------           Example        ---------------------------------

How to create / run Cpp program in Code Block ( in 3 steps )

  1. Use #include<iostream>  (  not these : #include<iostream.h>)
  2. Put std:: before cout<< , cin>> & <<endl 
  3. save as .cpp fle type
  4. select Compiler - setting > compiler > then 
  5. tick - gcc compiler
 ----------------------------------        Example      ------------------------------------

How to create / run Graphics program in Code Block ( in 6 steps )

  1. First download WinBGIm , then Extract it.
  2. Copy graphics.h and winbgim.h files in include folder of your compiler directory
  3. Copy libbgi.a to lib folder of your compiler directory
  4. In code::blocks open Settings >> Compiler and debugger >>linker settings click Add button in link libraries part and browse and select libbgi.a file
  5. In right part (i.e. other linker options) paste commands -lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32
  6. Click OK
 ----------------------------------           Example     ------------------------------------

Android C / C++ Compiler


C4droid ( crack )







Step 1 install   c4droid. (v 5.96)
Step 2 install  SDL plugin. (v 2.0.4)
Step 3 install  GCC plugin. ( v 6.1.0)
Step 4 open c4droid & Link all plugin.
Step 5 for c++ program please check examples in c4droid.

Offline - Compilers

Turbo C / C++

          Turbo C++ 3.2                       download     ( 6.9 mb)

Code Block

          Code Blocks -16.01               download     ( 111.9 mb)

for Graphics

         Turbo C++ 4.0 Windows 7/8                    download       ( 4.7 mb)


Info : in turbo c++ (4.0) for Graphics you can start with this___

                                   


#include<stdio.h>

#include<graphics.h>

void main()

{

int adp=DETECT ,xy;

initgraph(&adp,&xy,"c:/tc/bgi");



--------------------------------------------

--------------------------------------------

-------------------COD-------------------

--------------------------------------------

--------------------------------------------



}

Rectangular MOVING Fram ..☐

CODE

EXE FILE :-DOWNLOAD

#include<stdio.h>
#include<conio.h>
#include<graphics.h>

#define cleardevice(); //       //cleardevice();
void main()
{
int adp=DETECT ,xy,i,j=1,B,H;

int d=2;     // d = Delay
int x1=100,y1=100;
int x2=150,y2=100;
initgraph(&adp,&xy,"c:/tc/bgi");

//******** Input *****
printf("Enter Breadth : ");
scanf("%d",&B);
printf("Enter Height : ");
scanf("%d",&H);
cleardevice();

//************* R ****************
for(i=0;i<=B;i++)
 { cleardevice();
   x1=x1+1;
   x2=x2+1;
   line(x1,y1,x2,y2);
   delay(d);
 }
//*********** turn R-D **********
for(i=x1;x1!=x2;i++)
{ j++;
  cleardevice();
  x1=x1+1;
  line(x1,y1,x2,y2);
  line(x2,y2,x2,y2+j);
  delay(d);
}
y2=y2+50;


//************* D ***************
for(i=0;i<=H;i++)
 {  cleardevice();
   y2=y2+1;
   y1=y1+1;
   line(x1,y1,x2,y2);
   delay(d);
 }
//********* turn D-L ************
j=1;
for(i=y1;y1!=y2;i--)
{ j++;
  cleardevice();
  y1=y1+1;
  line(x1,y1,x2,y2);
  line(x2,y2,x2-j,y2);
  delay(d);
}
x2=x2-50;


//************* L ****************
for(i=0;i<=B;i++)
 { cleardevice();
   x1=x1-1;
   x2=x2-1;
   line(x1,y1,x2,y2);
   delay(d);
 }


//********* turn L-U ************
j=1;
for(i=x1;x1!=x2;i--)
{ j++;
  cleardevice();
  x1=x1-1;
  line(x1,y1,x2,y2);
  line(x2,y2,x2,y2-j);
  delay(d);
}
y2=y2-50;


//************* U ****************
for(i=0;i<=H;i++)
 { cleardevice();
   y1=y1-1;
   y2=y2-1;
   line(x1,y1,x2,y2);
   delay(d);
 }



 getch();
}




OUTPUT  EXAMPLE 












Quize ~ KBL (Kon Banega Lakhpati)






Heart pattern 💙 in C

        //HEART pattern <3 by while nesting
main()
{ int i=1,j,k,sp=5,sps=0,m,x=0,y,p,s=0;
  while(i<=9)
{ k=1;
   while(k<=sp)
   { printf(" ");
     k=k+1;
   }
   j=1;
  while(j<=i)
  { printf("_");
    j++;
  }
m=3;
while(m>=sps)
   { printf(" ");
     m=m-1;
   }
k=1;
   while(k<=sp)
   { printf(" ");
     k=k+1;
   }
j=1;
  while(j<=i)
  { printf("_");
    j++;
  }
i=i+2;
sp=sp-1;
sps=sps+1;
printf("\n");
}
printf("______I__Luv__U______\n");
while(x<=20)
{
p=1;
while(p<=s)
{ printf(" ");
  p=p+1;
}
y=20;
  while(y>=x)
  { printf("_");
    y=y-1;
   }
  x=x+2;
  printf("\n");
s++;
}
}