Write a function flatten() which flattens this linked list with each node down sorted link list to a single link list with all the elements in sorted order.
We have given Two methods in O(n^2)
Interview Questions asked in Google, Microsoft, Amazon
by Dhaval Dave
We have given Two methods in O(n^2)
by Dhaval Dave
by Dhaval Dave
Method 1 (Brute Force Method)
We can consider all substrings.
One by one and check for each substring whether it contains all unique characters or not.
There
by Dhaval Dave
Online Round Coding Question:
Q1. Given a float number 7.64, convert it into the string WITHOUT using any inbuilt function/library.
for eg:
input
float no.: 7.64
output
string:
by Dhaval Dave
Given a float number convert it into the string WITHOUT using any inbuilt Function
Method 1:
class Float2String { public static void main(String[] args) { float f=7.64f; String
by Dhaval Dave
1) Keep a Min & Max Heap of K size 2) Store first K elements
by Dhaval Dave
Loop Node5 Next pointer is point to Node3 in Singly Linked List 1 ---- 2 ---- 3 ---- 4 ---- 5 |_____________|