In recent years, one of the question I have increasingly seen in programming job interviews is about constant time sorting algorithms e.g. ...
Tampilkan postingan dengan label data structure and algorithm. Tampilkan semua postingan
Tampilkan postingan dengan label data structure and algorithm. Tampilkan semua postingan
How to Count Number of Leaf Nodes in Binary Tree - Java Iterative and Recursive Algorithm
You can use the same algorithm to count a number of leaf nodes in the binary tree which we have used in the last article, while printing all...
How to find square root of a number in Java - Algorithm Interview question
Write a program to calculate the square root of a number in Java or C++ is one of the popular coding interview questions from Programming jo...
Post Order binary tree traversal in Java - Recursion and Iteration
This is the third article on tree traversal. In the last couple of articles, I have shown you how to implement preorder and inorder traver...
How to check if two Rectangle Overlap in Java - Algorithm
Can you write a Java program to check if two rectangles are overlapping with each other or not? is one of the frequently asked coding quest...
Iterative QuickSort Example in Java - without Recursion
The quicksort algorithm is one of the important sorting algorithms. Similar to merge sort, quicksort also uses divide-and-conquer hence it...
How to Print all Leaf Nodes of Binary tree in Java - Recursion and Stack
Binary tree based questions are very common in Java or any other Programming job interviews. One of the frequently asked binary tree questio...
InOrder traversal of Binary tree in Java using Recursion and Iteration
This is the second article about tree traversal algorithms using Java. In the first part , we have seen the pre-order algorithm for visiting...
How to find the 3rd element from end in linked list in Java
The problem to find the 3rd element from the end in a singly linked list or nth node from the tail is one of the tricky but frequently asked...
Binary Tree PreOrder Traversal in Java - Recursion and Iteration Example
Unlike linked list and array which can only be traversed linearly, there are several ways to traverse a binary tree. The tree traversal algo...
How do you find length of a Singly Linked list using Loop and Recursion
Hi Guys, Here is one of the classical programming questions asked to me first time on an interview with multinational Investment bank. After...
How to Reverse Array in Java - Int and String Array Example
This Java tips is about, how to reverse array in Java, mostly primitive types e.g. int , long , double and String arrays. Despite of Java�...
How to generate MD5 Hash in Java - String Byte Array digest Example
There are multiple ways to generate the MD5 hash in Java program. Not only Java API provides a convenient method for generating MD5 hash, yo...
Top 15 Data Structures and Algorithm Interview Questions for Java programmer - Answers
Data structures and algorithm questions are an important part of any programming job interview, be it a Java interview, C++ interview or any...
2 ways to combine Arrays in Java � Integer, String Array Copy Example
There are multiple ways to combine or join two arrays in Java, both for primitive like int array and Object e.g. String array. You can even ...