Saturday, August 18, 2012

install Eclipse juno (3.7) on Ubuntu 11.04

1) Download Eclipse. eclipse-SDK-3.7-linux-gtk-x86_64.tar.gz
2) Extract it
tar xzf eclipse-SDK-3.7-linux-gtk-x86_64.tar.gz
 
Or just be lazy and Right Click > Extract Here 3) Move to /opt/ folder
mv eclipse /opt/
sudo chown -R root:root eclipse
sudo chmod -R +r eclipse
4) Create an eclipse executable in your path Change the current directory to cd /opt
sudo touch /usr/bin/eclipse
sudo chmod 755 /usr/bin/eclipse
sudo nano /usr/bin/eclipse
 
copy this into nano
#!/bin/sh
#export MOZILLA_FIVE_HOME="/usr/lib/mozilla/"
export ECLIPSE_HOME="/opt/eclipse"

$ECLIPSE_HOME/eclipse $*
 
save the file (^O = Ctrl+o) and exit nano (^X = Ctrl+x) 5) Create a gnome menu item
sudo nano /usr/share/applications/eclipse.desktop
 
copy this into nano
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse IDE
Exec=eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true
 
save and exit nano 6) Launch Eclipse for the first time
/opt/eclipse/eclipse -clean &
 
Source Blog : http://colinrrobinson.com/technology/install-eclipse-ubuntu/ 

Merging two sorted arrays - Big O (n+m) time complexity

 Problem :  Merge the two sorted arrays. Edge case :  Array can empty Arrays can be in different size let getMaxLength = ( input1 , input...